:root {
  --bg: #0f1226; --bg2: #161a36; --panel: #1b2044; --panel2: #232a57; --line: #313a75; --text: #eef1ff; --muted: #9aa3d6;
  --red: #ff3d4f; --red2: #c81e33; --yellow: #ffd23f; --blue: #3d7bff; --green: #43d17a; --gold: #ffcf4a; --pink: #ff6fb1;
  --pix: 'Press Start 2P', monospace; --sans: 'Nunito', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body { background: var(--bg); color: var(--text); font: 500 15px/1.55 var(--sans);
  background-image: radial-gradient(circle at 15% -10%, #2a2f6e 0, transparent 45%), radial-gradient(circle at 100% 0, #3a1f4f 0, transparent 40%); background-attachment: fixed; }
a { color: var(--yellow); }
img.spr { image-rendering: pixelated; image-rendering: crisp-edges; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .mono { font-family: var(--mono); }
h1, h2, h3 { font-family: var(--pix); line-height: 1.35; margin: 0 0 12px; letter-spacing: .02em; }
h1 { font-size: clamp(22px, 4.6vw, 40px); } h2 { font-size: clamp(16px, 2.6vw, 22px); } h3 { font-size: 13px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(15,18,38,.85); backdrop-filter: blur(8px); border-bottom: 2px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 14px; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; font: 400 15px var(--pix); color: var(--text); text-decoration: none; white-space: nowrap; }
.ball { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #16142a; background: linear-gradient(var(--red) 0 46%, #16142a 46% 54%, #fff 54%); position: relative; flex: none; }
.ball::after { content: ''; position: absolute; inset: 0; margin: auto; width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid #16142a; }
.ball.great { background: linear-gradient(var(--blue) 0 46%, #16142a 46% 54%, #fff 54%); }
.ball.ultra { background: linear-gradient(#2b2b2b 0 46%, #16142a 46% 54%, #fff 54%); box-shadow: inset 0 4px 0 -1px var(--yellow); }
.ball.master { background: linear-gradient(#8b3dff 0 46%, #16142a 46% 54%, #fff 54%); }
.nav .links { display: flex; gap: 4px; margin-left: 8px; }
.nav .links a { color: var(--muted); text-decoration: none; font-weight: 800; padding: 8px 12px; border-radius: 10px; }
.nav .links a.on, .nav .links a:hover { color: var(--text); background: var(--panel); }
.nav .sp { flex: 1; }
@media (max-width: 760px) { .nav .links [data-dt] { display: none; } .nav .links { margin-left: 0; } .logo span { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; font: 800 14px/1 var(--sans);
  padding: 12px 18px; border-radius: 12px; color: var(--text); background: var(--panel2); box-shadow: inset 0 -3px 0 rgba(0,0,0,.35); transition: transform .08s; white-space: nowrap; }
.btn:hover { filter: brightness(1.12); } .btn:active { transform: translateY(2px); box-shadow: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.btn.red { background: var(--red); } .btn.yellow { background: var(--yellow); color: #231b00; } .btn.blue { background: var(--blue); } .btn.green { background: var(--green); color: #052a12; }
.btn.ghost { background: transparent; border: 2px solid var(--line); box-shadow: none; }
.btn.sm { padding: 8px 11px; font-size: 13px; border-radius: 10px; }
.btn.xs { padding: 5px 8px; font-size: 12px; border-radius: 8px; }

/* cards */
.card { background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 18px; }
.gbbox { background: #fff; color: #1b1b2f; border: 4px solid #1b1b2f; border-radius: 12px; box-shadow: inset 0 0 0 3px #dfe3f0, 0 6px 0 rgba(0,0,0,.35); padding: 14px 16px; font: 400 12px/1.8 var(--pix); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font: 800 11px/1.4 var(--sans); text-transform: uppercase; letter-spacing: .05em; background: var(--panel2); color: var(--muted); }
.type { color: #14122a; }
.r-common { color: #c9cff0; } .r-uncommon { color: #6fe39a; } .r-rare { color: #5ab4ff; } .r-epic { color: #d68bff; } .r-legendary { color: var(--gold); text-shadow: 0 0 10px rgba(255,207,74,.6); }
.bg-common { background: #c9cff0; } .bg-uncommon { background: #6fe39a; } .bg-rare { background: #5ab4ff; } .bg-epic { background: #d68bff; } .bg-legendary { background: var(--gold); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 200; background: #fff; color: #1b1b2f; font: 400 11px/1.7 var(--pix); padding: 12px 16px; border: 4px solid #1b1b2f; border-radius: 12px; max-width: min(560px, calc(100vw - 32px)); box-shadow: 0 8px 0 rgba(0,0,0,.4); }
.toast.bad { background: #ffe1e4; }
.empty { color: var(--muted); padding: 28px 10px; text-align: center; border: 2px dashed var(--line); border-radius: var(--r); }
.grid { display: grid; gap: 12px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.kv > :nth-child(even) { text-align: right; font-family: var(--mono); }
.ca { display: flex; align-items: center; gap: 8px; background: var(--bg2); border: 2px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 14px; max-width: 560px; }
.ca code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 13px var(--mono); }
.banner { background: linear-gradient(90deg, #3d2a00, #2a1d4f); border: 2px solid var(--gold); color: var(--gold); border-radius: 12px; padding: 10px 14px; font-weight: 800; font-size: 13px; }

/* home */
.hero { padding: 48px 0 30px; display: grid; gap: 28px; align-items: center; }
@media (min-width: 940px) { .hero { grid-template-columns: 1.15fr 1fr; } }
.hero .tag { font: 400 11px var(--pix); color: var(--yellow); display: inline-flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(67,209,122,.7); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(67,209,122,0); } 100% { box-shadow: 0 0 0 0 rgba(67,209,122,0); } }
.hero p.lead { font-size: 18px; color: #cdd3fb; max-width: 620px; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 16px; }
.stage { position: relative; aspect-ratio: 4/3; border-radius: 18px; overflow: hidden; border: 4px solid #1b1b2f; box-shadow: 0 10px 0 rgba(0,0,0,.35);
  background: linear-gradient(#8fd3ff 0 55%, #5ec466 55% 100%); }
.stage .plat { position: absolute; width: 46%; height: 12%; border-radius: 50%; background: #3f9e48; box-shadow: inset 0 -6px 0 #2f7d37; }
.stage img { position: absolute; image-rendering: pixelated; }
.bob { animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6%); } }
.section { padding: 46px 0; }
.steps { display: grid; gap: 14px; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step .n { font: 400 26px var(--pix); color: var(--yellow); }
.step h3 { margin-top: 10px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat .v { font: 400 15px/1.5 var(--pix); color: var(--yellow); margin-top: 8px; white-space: nowrap; }
.stat .l { font: 800 11px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.two { display: grid; gap: 16px; } @media (min-width: 940px) { .two { grid-template-columns: 1fr 1fr; } }
.three { display: grid; gap: 16px; } @media (min-width: 940px) { .three { grid-template-columns: repeat(3, 1fr); } }
.board ol { margin: 0; padding: 0; list-style: none; counter-reset: n; }
.board li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); counter-increment: n; font-size: 14px; }
.board li::before { content: counter(n); font: 400 10px var(--pix); color: var(--muted); width: 22px; }
.board li b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .board li span { font-family: var(--mono); }
.feed { display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.feed .e { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 6px 8px; background: var(--bg2); border-radius: 10px; }
.feed .e img { width: 28px; height: 28px; flex: none; }
.feed .e time { color: var(--muted); font-size: 11px; margin-left: auto; white-space: nowrap; }
.feed .e.legendary, .feed .e.legendary-spawn { border: 1px solid var(--gold); }
.calc input[type=range] { width: 100%; accent-color: var(--yellow); }
.meter { height: 14px; background: var(--bg2); border-radius: 99px; overflow: hidden; border: 2px solid var(--line); }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--yellow), var(--red)); }
.legends { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.legend { display: flex; gap: 12px; align-items: center; }
.legend img { width: 72px; height: 72px; }
.foot { padding: 40px 0 60px; color: var(--muted); font-size: 13px; border-top: 2px solid var(--line); margin-top: 40px; }

/* play */
.hud { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 16px 0; }
.hud .card { padding: 12px 14px; }
.hud .v { font: 400 13px/1.6 var(--pix); margin-top: 4px; }
.playgrid { display: grid; gap: 14px; }
@media (min-width: 1080px) { .playgrid { grid-template-columns: 230px 1fr 290px; } }
.regions { display: grid; gap: 8px; }
@media (max-width: 1079px) { .regions { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.region { text-align: left; cursor: pointer; border: 2px solid var(--line); background: var(--panel); color: var(--text); border-radius: 12px; padding: 10px 12px; font: 800 14px var(--sans); display: grid; gap: 4px; }
.region.on { border-color: var(--yellow); box-shadow: 0 0 0 2px rgba(255,210,63,.25); }
.region .ts { display: flex; gap: 4px; flex-wrap: wrap; }
.region .ts i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.region .cnt { font: 600 12px var(--mono); color: var(--muted); }
.region.leg { border-color: var(--gold); animation: glow 1.2s infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 14px rgba(255,207,74,.6); } }
.field { position: relative; height: 430px; border-radius: 18px; overflow: hidden; border: 4px solid #1b1b2f; box-shadow: 0 8px 0 rgba(0,0,0,.35); }
.field .sky { position: absolute; inset: 0 0 62% 0; }
.field .gnd { position: absolute; inset: 38% 0 0 0; }
.field .gnd::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(0,0,0,.12) 2px, transparent 2.5px); background-size: 22px 22px; }
.field.night::after { content: ''; position: absolute; inset: 0; background: rgba(12,10,50,.45); pointer-events: none; }
.field .title { position: absolute; left: 12px; top: 10px; z-index: 3; font: 400 11px var(--pix); background: rgba(255,255,255,.92); color: #1b1b2f; padding: 7px 10px; border-radius: 9px; border: 3px solid #1b1b2f; }
.field .clock { position: absolute; right: 12px; top: 10px; z-index: 3; font: 400 10px var(--pix); background: rgba(27,27,47,.8); padding: 7px 10px; border-radius: 9px; }
.wild { position: absolute; z-index: 2; transform: translate(-50%, -100%); cursor: pointer; border: 0; background: none; padding: 0; display: grid; justify-items: center; }
.wild img { width: 72px; height: 72px; image-rendering: pixelated; filter: drop-shadow(0 4px 0 rgba(0,0,0,.25)); }
.wild.big img { width: 104px; height: 104px; }
.wild .nm { font: 800 11px var(--sans); background: rgba(27,27,47,.75); padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.wild .shadow { width: 46px; height: 9px; border-radius: 50%; background: rgba(0,0,0,.22); margin-top: -6px; }
.wild:hover img { transform: scale(1.08); }
.wild.gone { transition: opacity .4s, transform .4s; opacity: 0; transform: translate(-50%, -130%); }
.hop { animation: hop 2.2s ease-in-out infinite; }
@keyframes hop { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-14px); } 90% { transform: translateY(0); } }
.sparkle { position: absolute; top: -4px; right: -6px; font-size: 18px; animation: tw 1s infinite alternate; }
@keyframes tw { to { opacity: .3; transform: scale(.7); } }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 12px; }
.tabs button { border: 2px solid var(--line); background: var(--panel); color: var(--muted); font: 400 10px var(--pix); padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.tabs button.on { color: #231b00; background: var(--yellow); border-color: var(--yellow); }
.mons { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mon { background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 6px; position: relative; }
.mon.earning { border-color: rgba(67,209,122,.6); }
.mon .hd { display: flex; gap: 10px; align-items: center; }
.mon .hd img { width: 64px; height: 64px; background: var(--bg2); border-radius: 12px; flex: none; }
.mon .nm { font: 800 15px var(--sans); }
.mon .badge { position: absolute; top: 8px; right: 8px; }
.ivs { display: grid; grid-template-columns: 34px 1fr; gap: 3px 8px; font: 700 10px var(--mono); color: var(--muted); align-items: center; }
.ivs i { height: 6px; border-radius: 3px; background: var(--bg2); display: block; overflow: hidden; } .ivs i b { display: block; height: 100%; background: var(--blue); }
.mon .acts { display: flex; gap: 5px; flex-wrap: wrap; }
.mon .acts input { width: 100px; background: var(--bg2); border: 2px solid var(--line); color: var(--text); border-radius: 8px; padding: 4px 6px; font: 600 12px var(--mono); }
.dex { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.dex .d { background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 8px; text-align: center; font-size: 12px; }
.dex .d img { width: 64px; height: 64px; }
.dex .d.unseen img { filter: brightness(0) opacity(.55); }
.dex .d .no { font: 400 8px var(--pix); color: var(--muted); }
.side { display: grid; gap: 14px; align-content: start; }
.balls { display: flex; gap: 10px; flex-wrap: wrap; font: 700 13px var(--mono); }
.balls span { display: inline-flex; align-items: center; gap: 5px; }
.balls .ball { width: 18px; height: 18px; border-width: 2px; } .balls .ball::after { width: 5px; height: 5px; border-width: 1px; }

/* encounter */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(6,7,20,.72); display: grid; place-items: center; padding: 12px; }
.modal[hidden] { display: none; }
.battle { width: min(620px, 100%); background: var(--panel); border: 4px solid #1b1b2f; border-radius: 18px; overflow: hidden; box-shadow: 0 12px 0 rgba(0,0,0,.4); }
.arena { position: relative; height: 290px; }
.arena .foe { position: absolute; right: 12%; top: 18%; width: 150px; height: 150px; image-rendering: pixelated; transition: transform .3s, opacity .3s, filter .3s; }
.arena .plat { position: absolute; right: 6%; top: 60%; width: 230px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.18); }
.arena .info { position: absolute; left: 12px; top: 14px; width: min(260px, 55%); }
.arena .info .gbbox { font-size: 10px; padding: 10px 12px; }
.ringwrap { position: absolute; right: calc(12% + 75px); top: calc(18% + 75px); width: 0; height: 0; }
.ring { position: absolute; left: -80px; top: -80px; width: 160px; height: 160px; border-radius: 50%; border: 5px solid var(--green); pointer-events: none; box-shadow: 0 0 0 2px #16142a, inset 0 0 0 2px #16142a; }
.thrown { position: absolute; left: 14%; bottom: 8%; width: 34px; height: 34px; z-index: 4; }
.thrown.fly { transition: left .55s cubic-bezier(.3,.1,.5,1), bottom .55s cubic-bezier(.2,.9,.5,1); }
.shake { animation: shake .45s ease-in-out; }
@keyframes shake { 25% { transform: rotate(-24deg); } 75% { transform: rotate(24deg); } }
.battle .ctrl { padding: 14px; display: grid; gap: 12px; background: var(--bg2); border-top: 4px solid #1b1b2f; }
.battle .ballpick { display: flex; gap: 8px; flex-wrap: wrap; }
.battle .ballpick button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel); color: var(--text); font: 800 13px var(--sans); cursor: pointer; }
.battle .ballpick button.on { border-color: var(--yellow); }
.battle .ballpick .ball { width: 20px; height: 20px; border-width: 2px; } .battle .ballpick .ball::after { width: 6px; height: 6px; border-width: 1px; }
input.txt { background: var(--bg2); border: 2px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px 12px; font: 600 14px var(--sans); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 800 11px var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 8px; border-bottom: 2px solid var(--line); }
.tbl td { padding: 8px; border-bottom: 1px dashed var(--line); } .tbl .r { text-align: right; }
.scroll-x { overflow-x: auto; }
[hidden] { display: none !important; }

/* coin launches */
.lgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.lc { background: var(--panel); border: 2px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 12px; position: relative; }
.lc.leg { border-color: var(--gold); box-shadow: 0 0 22px rgba(255,207,74,.15); }
.lc-top { display: flex; justify-content: space-between; gap: 8px; }
.lc-top .pill .dot { width: 7px; height: 7px; }
.pill.pf { background: #0f3d2a; color: #6ff0a8; }
.lc-body { display: flex; gap: 14px; align-items: center; }
.lc-art { width: 92px; height: 92px; flex: none; border-radius: 14px; display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, #2f3a7a, var(--bg2)); }
.lc-art img { width: 80px; height: 80px; image-rendering: pixelated; }
.lc-tk { font: 400 15px/1.4 var(--pix); color: var(--yellow); word-break: break-all; }
.lc.leg .lc-tk { color: var(--gold); text-shadow: 0 0 10px rgba(255,207,74,.5); }
.lc-nm { font: 800 15px var(--sans); }
.lc-cd { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 10px; background: var(--bg2); border-radius: 12px; padding: 10px 12px; }
.lc-cd b { font: 400 14px var(--pix); text-align: right; }
.lc-cd > span:last-child { grid-column: 1 / -1; }
.lc-ca { display: flex; gap: 8px; align-items: center; border: 2px dashed var(--line); border-radius: 10px; padding: 7px 10px; }
.lc-ca code { font: 600 12px var(--mono); color: var(--muted); }
.lc-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.lc.big { padding: 20px; }
@media (min-width: 860px) {
  .lc.big { grid-template-columns: 1.4fr 1fr; grid-template-areas: "top top" "body cd" "body ca" "acts acts"; }
  .lc.big .lc-top { grid-area: top; } .lc.big .lc-body { grid-area: body; } .lc.big .lc-cd { grid-area: cd; } .lc.big .lc-ca { grid-area: ca; } .lc.big .lc-acts { grid-area: acts; }
  .lc.big .lc-art { width: 150px; height: 150px; } .lc.big .lc-art img { width: 132px; height: 132px; }
  .lc.big .lc-tk { font-size: 22px; } .lc.big .lc-cd b { font-size: 22px; }
}
