/* Launcher + game loading pages (not part of the original games) */
:root { --gold1: #ffd760; --gold2: #f2a516; --ink: #e9eef8; --muted: #9aa6bd; --card: #111829; --line: #26304a; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #05070d; color: var(--ink);
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", sans-serif; }
body.site { background: radial-gradient(1200px 700px at 50% -10%, #1b2847 0%, #0b1122 55%, #05070d 100%) fixed; }
a { color: inherit; }

/* pill buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 22px; border-radius: 999px;
  font: 700 14px/1 inherit; font-family: inherit; color: #2a1a00; text-decoration: none; cursor: pointer; border: 0;
  background: linear-gradient(180deg, var(--gold1), var(--gold2)); box-shadow: 0 4px 14px rgba(242, 165, 22, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease; }
.btn:hover { filter: brightness(1.08); box-shadow: 0 6px 20px rgba(242, 165, 22, .5), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.btn.big { padding: 14px 40px; font-size: 18px; }

/* ---------------------------------------------------------------- launcher */
.top { height: 52px; display: flex; align-items: center; padding: 0 18px; background: linear-gradient(#141821, #0b0e14);
  border-bottom: 1px solid #1e2533; }
.top img { height: 30px; image-rendering: auto; }
.wrap { max-width: 880px; margin: 0 auto; padding: 40px 20px 30px; }
h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: .2px; }
.sub { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); border-color: #3a4870; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.card .art { height: 170px; display: flex; align-items: center; justify-content: center; position: relative; }
.card .art img { width: 82%; max-width: 330px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.card.nfh1 .art { background: radial-gradient(120% 120% at 50% 20%, #3a3f8f 0%, #1a1c4a 55%, #0d0e26 100%); }
.card.nfh2 .art { background: radial-gradient(120% 120% at 50% 20%, #1c8a9c 0%, #0d4a63 55%, #072332 100%); }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h2 { margin: 0; font-size: 17px; }
.card .meta { color: #f0b440; font-size: 12.5px; font-weight: 600; }
.card p { margin: 4px 0 14px; color: #c4ccdc; font-size: 13.5px; flex: 1; }
.foot { margin-top: 34px; padding-top: 18px; border-top: 1px solid #1c2336; display: flex; gap: 16px; align-items: center;
  color: #7f8aa3; font-size: 12px; }
.foot img { height: 36px; opacity: .9; }

/* ---------------------------------------------------------------- game page */
html:has(body.game) { height: 100%; }
body.game { overflow: hidden; height: 100%; display: flex; align-items: center; justify-content: center; background: #000; }
#screen { display: block; image-rendering: auto; cursor: none; touch-action: none; }
#boot { position: fixed; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  background: radial-gradient(900px 600px at 50% 42%, #1d2b4d 0%, #0b1122 55%, #030509 100%); user-select: none; }
#boot.nfh2 { background: radial-gradient(900px 600px at 50% 42%, #134a5c 0%, #0a2230 55%, #020709 100%); }
#boot .logo { width: min(440px, 70vw); filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .6)); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.load { width: min(400px, 76vw); display: flex; flex-direction: column; gap: 9px; }
.bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); overflow: hidden; }
.fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #f2a516, #ffd760);
  box-shadow: 0 0 12px rgba(255, 196, 64, .65); position: relative; overflow: hidden; }
.fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: translateX(-100%); animation: shine 1.4s linear infinite; }
@keyframes shine { to { transform: translateX(100%); } }
.stat { display: flex; justify-content: space-between; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.stat b { color: var(--ink); font-weight: 600; }
#play { display: none; animation: pop .35s ease-out; }
@keyframes pop { from { opacity: 0; transform: scale(.9); } }
.hint { color: #6f7b94; font-size: 12px; min-height: 1em; }
.back { position: fixed; top: 12px; left: 14px; z-index: 3; color: #8d98b0; font-size: 12.5px; text-decoration: none; }
.back:hover { color: #fff; }
#err { display: none; max-width: min(640px, 90vw); max-height: 30vh; overflow: auto; color: #ff8a8a; white-space: pre-wrap; font: 12px/1.4 monospace; }
