/* KND Verse · kndverse.com/how-to-play — the "How to play" hub and one guide per game. Loaded after tokens.css + site.css
   (the shared shell). Everything is centred and symmetric (owner rule), short blocks, numbers and chips to scan.
   Static pages under a strict CSP: no inline styles, no scripts of their own. */

.ht { --ht-w: 1040px; --ht-glow: 0 0 0 1px rgba(111, 244, 255, .18), 0 18px 48px rgba(0, 0, 0, .45); }
.ht-wrap { max-width: var(--ht-w); margin: 0 auto; }

/* ── guide switcher (top of every page) ── */
.ht-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -12px auto 8px; padding: 0; list-style: none; }
.ht-switch a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--kv-line);
  background: rgba(16, 13, 48, .6); color: #c9cff5; text-decoration: none; font: 700 11px/1 var(--kv-hud); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.ht-switch a:hover { border-color: var(--kv-line-strong); color: var(--kv-cyan-hi); }
.ht-switch a[aria-current="page"] { background: linear-gradient(180deg, var(--kv-cyan-hi), var(--kv-cyan)); color: var(--kv-ink); border-color: transparent; }

/* ── hero ── */
.ht-hero { text-align: center; padding: 26px 0 8px; }
.ht-hero .site-title { font-size: clamp(30px, 5.4vw, 60px); text-shadow: 0 0 28px rgba(0, 215, 233, .35); }
.ht-hero .site-lede { max-width: 56ch; }
.ht-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.ht-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--kv-line);
  background: rgba(30, 26, 82, .55); color: #dfe3ff; font: 600 11px/1.2 var(--kv-mono); letter-spacing: .12em; text-transform: uppercase; }
.ht-chip--beta { border-color: rgba(255, 194, 26, .55); color: var(--kv-gold-hi); background: rgba(255, 194, 26, .08); }
.ht-chip--live { border-color: rgba(61, 220, 151, .5); color: #a8f5d2; }
.ht-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }

/* ── screenshots ── */
.ht-shot { margin: 32px auto 0; max-width: var(--ht-w); text-align: center; }
.ht-shot a { display: block; border-radius: var(--kv-radius-lg); overflow: hidden; box-shadow: var(--ht-glow); border: 1px solid var(--kv-line-strong); background: var(--kv-night); }
.ht-shot img { display: block; width: 100%; height: auto; }
.ht-shot a:hover { border-color: var(--kv-cyan); }
.ht-shot figcaption { margin-top: 10px; color: var(--kv-muted); font-size: 13px; }
.ht-shot--sm { max-width: 760px; }
.ht-pair { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; max-width: var(--ht-w); margin: 32px auto 0; }
.ht-pair .ht-shot { margin: 0; }
.ht-pair { align-items: center; }
.ht-pair .ht-cards { gap: 10px; }
.ht-pair .ht-cards > li { flex-basis: 100%; padding: 14px 16px; }

/* ── table of contents ── */
.ht-toc { margin: 36px auto 0; text-align: center; }
.ht-toc ol { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; margin: 0; padding: 8px; list-style: none; counter-reset: toc;
  border: 1px solid var(--kv-line); border-radius: 18px; background: rgba(11, 10, 36, .72); }
.ht-toc li { counter-increment: toc; }
.ht-toc a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 12px; color: #dfe3ff; text-decoration: none; font-size: 14px; font-weight: 600; }
.ht-toc a::before { content: counter(toc, decimal-leading-zero); font: 700 11px/1 var(--kv-mono); color: var(--kv-cyan); }
.ht-toc a:hover { background: rgba(111, 244, 255, .08); color: var(--kv-cyan-hi); }

/* ── sections ── */
.ht-sec { max-width: var(--ht-w); margin: 0 auto; padding-top: 64px; scroll-margin-top: 72px; counter-increment: sec; }
.ht-guide { counter-reset: sec; }
.ht-sec > h2 { margin: 0 0 8px; text-align: center; font: 700 clamp(19px, 2.6vw, 26px)/1.2 var(--kv-hud); letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.ht-sec > h2::before { content: counter(sec, decimal-leading-zero); display: block; width: max-content; margin: 0 auto 12px; padding: 5px 10px; border-radius: 8px;
  font: 700 12px/1 var(--kv-mono); letter-spacing: .18em; color: var(--kv-ink); background: linear-gradient(180deg, var(--kv-cyan-hi), var(--kv-cyan)); box-shadow: var(--kv-bevel-sm); }
.ht-sec > .ht-sub { max-width: 60ch; margin: 0 auto 26px; text-align: center; color: var(--kv-muted); }
.ht-h3 { margin: 34px 0 14px; text-align: center; font: 700 15px/1.3 var(--kv-hud); letter-spacing: .12em; text-transform: uppercase; color: var(--kv-cyan-hi); }

/* goal: one big centred statement */
.ht-goal { max-width: 720px; margin: 0 auto; padding: 26px 24px; text-align: center; border-radius: var(--kv-radius-lg); border: 1px solid rgba(237, 0, 158, .45);
  background: radial-gradient(ellipse at 50% 0%, rgba(237, 0, 158, .18), transparent 70%), var(--kv-panel); box-shadow: var(--kv-glow-pink); }
.ht-goal p { margin: 0; font: 600 clamp(17px, 2.3vw, 21px)/1.45 var(--kv-display); color: #fff; }
.ht-goal small { display: block; margin-top: 10px; color: var(--kv-muted); font: 400 14px/1.5 var(--kv-font); }

/* numbered steps */
.ht-steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 0; padding: 18px 0 0; list-style: none; counter-reset: step; }
.ht-steps > li { counter-increment: step; position: relative; padding: 46px 18px 18px; text-align: center; border-radius: var(--kv-radius); border: 1px solid var(--kv-line);
  background: linear-gradient(180deg, rgba(30, 26, 82, .7), rgba(16, 13, 48, .86)); }
.ht-steps > li::before { content: counter(step); position: absolute; top: -16px; left: 50%; transform: translateX(-50%); width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; border: 3px solid var(--kv-void); background: linear-gradient(180deg, var(--kv-gold-hi), var(--kv-gold)); color: var(--kv-ink); font: 900 18px/1 var(--kv-hud); box-shadow: var(--kv-bevel-sm); }
.ht-steps b { display: block; margin-bottom: 6px; color: #fff; font: 700 14px/1.3 var(--kv-hud); letter-spacing: .06em; text-transform: uppercase; }
.ht-steps p { margin: 0; color: #d2d7fa; font-size: 15px; }

/* stat tiles */
.ht-facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0; }
.ht-table-wrap + .ht-facts, .ht-facts + .ht-table-wrap { margin-top: 16px; }
.ht-facts > div { padding: 16px 12px; text-align: center; border-radius: var(--kv-radius); border: 1px solid var(--kv-line); background: var(--kv-panel); }
.ht-facts dt { margin: 0 0 6px; font: 800 clamp(22px, 3vw, 30px)/1 var(--kv-hud); color: var(--kv-cyan-hi); }
.ht-facts dd { margin: 0; color: var(--kv-muted); font-size: 13px; line-height: 1.4; }

/* mechanic cards */
/* flex, not grid: a last row with fewer cards stays centred (symmetry) */
.ht-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ht-cards > li { flex: 0 1 calc((100% - 28px) / 3); min-width: 0; padding: 18px; text-align: center; border-radius: var(--kv-radius); border: 1px solid var(--kv-line); border-top: 3px solid var(--ht-accent, var(--kv-cyan));
  background: var(--kv-panel); }
.ht-cards > li:nth-child(5n+2) { --ht-accent: var(--kv-magenta); }
.ht-cards > li:nth-child(5n+3) { --ht-accent: var(--kv-gold); }
.ht-cards > li:nth-child(5n+4) { --ht-accent: var(--kv-violet); }
.ht-cards > li:nth-child(5n+5) { --ht-accent: var(--kv-ok); }
.ht-cards b { display: block; margin-bottom: 6px; color: #fff; font: 700 14px/1.3 var(--kv-hud); letter-spacing: .06em; text-transform: uppercase; }
.ht-cards p { margin: 0; color: #d2d7fa; font-size: 15px; }
.ht-cards p + p { margin-top: 6px; }
.ht-tag { display: inline-block; margin: 0 2px 8px; padding: 3px 8px; border-radius: 6px; font: 700 11px/1.2 var(--kv-mono); letter-spacing: .08em; color: var(--kv-ink); background: var(--kv-cyan-hi); }
.ht-tag--pink { background: var(--kv-pink); }
.ht-tag--gold { background: var(--kv-gold); }
.ht-tag--violet { background: var(--kv-gem); }

/* tables (rewards, packs…) */
.ht-table-wrap { overflow-x: auto; scrollbar-width: thin; margin: 0 auto; max-width: 100%; border-radius: var(--kv-radius); border: 1px solid var(--kv-line); background: var(--kv-panel); }
.ht-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ht-table caption { padding: 12px; color: var(--kv-muted); font-size: 13px; caption-side: bottom; }
.ht-table th, .ht-table td { padding: 12px 14px; text-align: center; border-bottom: 1px solid rgba(120, 140, 255, .16); }
.ht-table thead th { font: 700 11px/1.3 var(--kv-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--kv-cyan-hi); background: rgba(30, 26, 82, .6); }
.ht-table tbody th { color: #fff; font-weight: 700; }
.ht-table td { color: #dfe3ff; }
.ht-table tbody tr:last-child > * { border-bottom: 0; }
.ht-num { font-family: var(--kv-mono); font-weight: 700; color: var(--kv-gold-hi); white-space: nowrap; }

/* controls */
.ht-keys { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.ht-keys > section { padding: 20px; border-radius: var(--kv-radius); border: 1px solid var(--kv-line); background: var(--kv-panel); }
.ht-keys h3 { margin: 0 0 14px; text-align: center; font: 700 13px/1 var(--kv-hud); letter-spacing: .16em; text-transform: uppercase; color: var(--kv-cyan-hi); }
.ht-keys ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ht-keys li { display: grid; grid-template-columns: minmax(96px, 40%) 1fr; gap: 12px; align-items: center; font-size: 14.5px; color: #dfe3ff; }
.ht-keys li > span:first-child { text-align: right; color: #fff; font-weight: 700; }
kbd { display: inline-block; min-width: 26px; margin: 1px 2px; padding: 3px 7px; border-radius: 7px; border: 1px solid var(--kv-line-strong); border-bottom-width: 3px;
  background: var(--kv-hull); color: #fff; font: 700 12px/1.3 var(--kv-mono); text-align: center; }

/* callouts */
.ht-tips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ht-tips > li { flex: 0 1 calc((100% - 24px) / 3); min-width: 0; padding: 18px; text-align: center; border-radius: var(--kv-radius); border: 1px dashed rgba(255, 194, 26, .45); background: rgba(255, 194, 26, .05); color: #f1edd9; font-size: 15px; }
.ht-note { max-width: 760px; margin: 22px auto 0; padding: 14px 18px; text-align: center; border-radius: 14px; border: 1px solid var(--kv-line); background: rgba(11, 10, 36, .7); color: var(--kv-muted); font-size: 14px; }
.ht-note strong { color: #fff; }
.ht-note--beta { border-color: rgba(255, 194, 26, .45); color: #f1e6b8; }

/* prev / next */
.ht-pager { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; max-width: var(--ht-w); margin: 72px auto 0; }
.ht-pager a { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: var(--kv-radius); border: 1px solid var(--kv-line); background: var(--kv-panel); color: #fff; text-decoration: none; }
.ht-pager a:hover { border-color: var(--kv-cyan); box-shadow: var(--kv-glow-cyan); }
.ht-pager small { font: 600 11px/1 var(--kv-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--kv-muted); }
.ht-pager b { font: 700 16px/1.2 var(--kv-hud); letter-spacing: .08em; text-transform: uppercase; }
.ht-pager .is-next { text-align: right; align-items: flex-end; }
.ht-pager .is-prev { align-items: flex-start; }
.ht-pager .is-empty { visibility: hidden; }

/* ── hub ── */
.ht-start { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 0; max-width: var(--ht-w); margin: 18px auto 0; overflow: hidden;
  border-radius: var(--kv-radius-lg); border: 1px solid var(--kv-line-strong); background: var(--kv-panel); box-shadow: var(--ht-glow); color: inherit; text-decoration: none; }
.ht-start img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.ht-start__txt { padding: 28px; text-align: center; }
.ht-start__txt h2 { margin: 6px 0 10px; font: 700 clamp(22px, 3vw, 30px)/1.1 var(--kv-hud); letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.ht-start__txt p { margin: 0 0 18px; color: var(--kv-muted); }
.ht-start:hover { border-color: var(--kv-cyan); }
.ht-start:hover .site-btn { filter: brightness(1.1); }

.ht-games { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); max-width: var(--ht-w); margin: 0 auto; padding: 0; list-style: none; }
.ht-game { height: 100%; }
.ht-game a { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: var(--kv-radius-lg); border: 1px solid var(--kv-line); background: var(--kv-panel);
  color: inherit; text-decoration: none; transition: transform .2s var(--kv-ease), border-color .2s, box-shadow .2s; }
.ht-game a:hover { transform: translateY(-3px); border-color: var(--kv-cyan); box-shadow: var(--kv-glow-cyan); }
.ht-game img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--kv-line); }
.ht-game__body { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 16px 18px; text-align: center; }
.ht-game h3 { margin: 0; font: 700 17px/1.2 var(--kv-hud); letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.ht-game p { margin: 0; color: var(--kv-muted); font-size: 14.5px; }
.ht-game .ht-chips { margin: 0; gap: 6px; }
.ht-game .ht-chip { padding: 4px 9px; font-size: 10px; }
.ht-game__go { margin-top: auto; padding-top: 6px; font: 700 12px/1 var(--kv-hud); letter-spacing: .14em; text-transform: uppercase; color: var(--kv-cyan-hi); }

.ht-coins { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ht-coins > li { flex: 0 1 calc((100% - 48px) / 5); min-width: 0; padding: 16px 12px; text-align: center; border-radius: var(--kv-radius); border: 1px solid var(--kv-line); background: var(--kv-panel); }
.ht-coins b { display: block; margin-bottom: 6px; font: 700 13px/1.2 var(--kv-hud); letter-spacing: .08em; text-transform: uppercase; color: var(--ht-c, var(--kv-cyan-hi)); }
.ht-coins p { margin: 0; color: #d2d7fa; font-size: 14px; }
.ht-coins > li:nth-child(1) { --ht-c: var(--kv-gold-hi); }
.ht-coins > li:nth-child(2) { --ht-c: var(--kv-cyan-hi); }
.ht-coins > li:nth-child(3) { --ht-c: var(--kv-ok); }
.ht-coins > li:nth-child(4) { --ht-c: var(--kv-gem); }
.ht-coins > li:nth-child(5) { --ht-c: var(--kv-orange); }

.ht-center { text-align: center; margin-top: 22px; }

/* ── responsive ── */
@media (max-width: 960px) {
  .ht-games { grid-template-columns: 1fr 1fr; }
  .ht-coins > li { flex-basis: calc((100% - 24px) / 3); }
  .ht-cards > li { flex-basis: calc((100% - 14px) / 2); }
  .ht-tips > li { flex-basis: calc((100% - 12px) / 2); }
}
@media (max-width: 760px) {
  .ht-start { grid-template-columns: 1fr; }
  .ht-pair, .ht-keys { grid-template-columns: 1fr; }
  .ht-sec { padding-top: 52px; }
  .ht-steps { grid-template-columns: 1fr; gap: 26px; }
  .ht-cards > li, .ht-tips > li { flex-basis: 100%; }
  .ht-switch { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: -16px -20px 8px; padding: 2px 20px 8px; scrollbar-width: none; }
  .ht-switch::-webkit-scrollbar { display: none; }
  .ht-toc ol { display: flex; }
}
@media (max-width: 560px) {
  .site-main.ht { padding-left: 16px; padding-right: 16px; }
  .ht-switch { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .ht-games { grid-template-columns: 1fr; }
  .ht-pager { grid-template-columns: 1fr; }
  .ht-pager .is-empty { display: none; }
  .ht-keys ul { gap: 0; }
  .ht-keys li { grid-template-columns: 1fr; gap: 2px; padding: 9px 0; text-align: center; border-top: 1px solid rgba(120, 140, 255, .14); }
  .ht-keys li:first-child { border-top: 0; padding-top: 0; }
  .ht-keys li > span:first-child { text-align: center; }
  .ht-table { font-size: 14px; }
  .ht-table th, .ht-table td { padding: 10px 8px; }
  .ht-facts { grid-template-columns: 1fr 1fr; }
  .ht-coins > li { flex-basis: calc((100% - 12px) / 2); }
}
@media (prefers-reduced-motion: reduce) { .ht-game a { transition: none; } .ht-game a:hover { transform: none; } }
