/* PKMN Swarm - the public companion site.
   Same palette and furniture as the OBS overlays (agent/obs/*.html) so the site and the stream read as one
   project. Unlike those, this IS an ordinary web page: it may animate whatever it likes, and it has to survive a
   phone. Motion is decoration only - everything reads with prefers-reduced-motion on. */
:root {
  --bg: #0b0f14; --panel: #131a22; --panel2: #0f151c; --line: #24303b;
  --text: #e9f1f7; --muted: #93a4b4; --faint: #61707e;
  --accent: #4fd1a5; --gold: #ffd23f; --warn: #f0b429; --info: #6aa9ff; --iron: #c792ea; --bad: #f25f5c;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--sans);
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --wrap: 1200px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.5;
       -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -.4px; margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); } .faint { color: var(--faint); }
img { image-rendering: pixelated; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 28px;
       padding: 12px 28px; background: rgba(11, 15, 20, .82); backdrop-filter: blur(14px) saturate(1.4);
       border-bottom: 1px solid rgba(36, 48, 59, .8); }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 500; font-size: 16px;
         letter-spacing: 2.4px; }
.brand b { font-weight: 700; margin-left: 5px;
           background: linear-gradient(90deg, var(--accent), var(--info)); -webkit-background-clip: text;
           background-clip: text; color: transparent; }
.logo { width: 34px; height: 34px; flex: none; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.brand:hover .logo { transform: rotate(60deg) scale(1.06); }
.nav .links { display: flex; gap: 4px; font-size: 14px; color: var(--muted); }
.nav .links a { padding: 7px 12px; border-radius: 8px; transition: color .15s, background .15s; }
.nav .links a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav .right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); font-family: var(--mono);
        letter-spacing: .6px; text-transform: uppercase; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.pill.on { color: var(--text); }
.pill.on .dot { background: var(--bad); box-shadow: 0 0 10px var(--bad); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .35 } }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 10px; font-weight: 700;
       font-size: 13.5px; border: 1px solid transparent; transition: transform .15s, box-shadow .2s, filter .2s; }
.btn.primary { background: linear-gradient(135deg, var(--accent), #3bb8d0); color: #04130d;
               box-shadow: 0 6px 24px -8px rgba(79, 209, 165, .7); }
.btn.ghost { border-color: rgba(240, 180, 41, .55); color: var(--gold); background: rgba(240, 180, 41, .05); }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn.big { padding: 14px 26px; font-size: 15px; border-radius: 12px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 70px 0 34px; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -240px 0 auto; height: 900px; pointer-events: none; z-index: -2;
  background: radial-gradient(900px 520px at 16% 8%, rgba(79, 209, 165, .16), transparent 62%),
              radial-gradient(900px 560px at 84% 20%, rgba(106, 169, 255, .15), transparent 62%),
              radial-gradient(700px 400px at 60% 90%, rgba(199, 146, 234, .08), transparent 65%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0 1px, transparent 1px 40px),
              repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0 1px, transparent 1px 40px);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%); }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .7; }
.herogrid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 9px; padding: 7px 16px; border-radius: 999px;
          background: rgba(19, 26, 34, .8); border: 1px solid var(--line); font-size: 11.5px; letter-spacing: 1.8px;
          text-transform: uppercase; font-weight: 700; color: var(--gold); }
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold);
               animation: blink 2s infinite; }
.hero h1 { margin: 22px 0 0; font-size: clamp(42px, 5.6vw, 74px); line-height: 1.02; letter-spacing: -2px; }
.hero h1 em { font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--info), var(--iron), var(--accent));
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 10s linear infinite; }
@keyframes sheen { to { background-position: 300% 0 } }
.hero p.lede { max-width: 560px; margin: 22px 0 0; font-size: 17.5px; color: var(--muted); }
.hero .cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero .meta { margin-top: 20px; font-family: var(--mono); font-size: 12.5px; color: var(--faint); }

/* the constellation: six runs wired to one brain */
.orbit { position: relative; width: min(100%, 470px); aspect-ratio: 1; margin: 0 auto; }
.orbit svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbit .wire { stroke: url(#mk); stroke-width: 1.4; opacity: .5; stroke-dasharray: 4 7; animation: flow 1.6s linear infinite; }
.orbit .wire.idle { opacity: .16; animation: none; }
.orbit .hex { fill: none; stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
@keyframes flow { to { stroke-dashoffset: -22 } }
.core { position: absolute; left: 50%; top: 50%; width: 31%; aspect-ratio: 1; transform: translate(-50%, -50%);
        border-radius: 50%; display: grid; place-items: center; text-align: center;
        background: radial-gradient(circle at 50% 35%, #1c2733, #0d1319 70%);
        border: 1px solid rgba(255, 210, 63, .45);
        box-shadow: 0 0 0 8px rgba(255, 210, 63, .05), 0 0 60px -6px rgba(255, 210, 63, .35); }
.core::before, .core::after { content: ""; position: absolute; inset: -14%; border-radius: 50%;
        border: 1px solid rgba(255, 210, 63, .22); animation: ring 3.2s ease-out infinite; }
.core::after { animation-delay: 1.6s; }
@keyframes ring { from { transform: scale(.82); opacity: .9 } to { transform: scale(1.45); opacity: 0 } }
.core .gen { font-family: var(--display); font-weight: 700; font-size: clamp(17px, 2.2vw, 25px); color: var(--gold);
             line-height: 1; letter-spacing: -.5px; }
.core .cap { font-size: 9.5px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.orb { position: absolute; width: 19%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.orb .disc { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
             background: radial-gradient(circle at 50% 30%, #1d2833, #10161d 75%);
             border: 2px solid var(--ring, var(--line)); box-shadow: 0 0 26px -8px var(--ring, transparent);
             animation: bob 5s ease-in-out infinite; animation-delay: var(--d, 0s); }
.orb img { width: 68%; height: 68%; object-fit: contain; }
.orb.off .disc { filter: grayscale(.8) brightness(.7); }
.orb .tag { position: absolute; left: 50%; top: 104%; transform: translateX(-50%); white-space: nowrap;
            font-family: var(--mono); font-size: 10px; letter-spacing: .8px; color: var(--muted); text-align: center; }
.orb .tag b { color: var(--text); }
.orb .fight { position: absolute; right: 4%; top: 4%; width: 13px; height: 13px; border-radius: 50%; background: var(--bad);
              border: 2px solid var(--bg); box-shadow: 0 0 10px var(--bad); animation: blink 1s infinite; }
@keyframes bob { 50% { transform: translateY(-5px) } }

/* the numbers band */
.stats { margin-top: 54px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; border-radius: 18px;
         overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.stat { background: rgba(15, 21, 28, .92); padding: 20px 18px; }
.stat b { display: block; font-family: var(--display); font-size: clamp(24px, 2.6vw, 34px); font-weight: 700;
          line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.stat span { display: block; margin-top: 6px; font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase;
             color: var(--muted); }

/* ---------- ticker ---------- */
.ticker { border-block: 1px solid var(--line); background: var(--panel2); overflow: hidden; white-space: nowrap;
          margin: 26px 0 84px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker .track { display: inline-flex; gap: 44px; padding: 11px 0; font-family: var(--mono); font-size: 12.5px;
                 color: var(--muted); animation: scroll 60s linear infinite; }
.ticker .track span b { color: var(--text); font-weight: 600; }
.ticker .track span i { font-style: normal; color: var(--gold); margin-right: 8px; }
@keyframes scroll { to { transform: translateX(-50%) } }

/* ---------- sections ---------- */
section { padding: 0 0 96px; }
section > .wrap > h2 { font-size: clamp(27px, 3.4vw, 38px); letter-spacing: -1px; }
section > .wrap > p.sub { max-width: 640px; color: var(--muted); font-size: 15.5px; margin: 12px 0 28px; }
.eyebrow { font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--accent); font-weight: 700;
           margin-bottom: 12px; font-family: var(--mono); }
.subhead { margin: 40px 0 6px; font-size: 21px; }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- cards ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { position: relative; background: linear-gradient(180deg, #151d26, var(--panel)); border: 1px solid var(--line);
        border-radius: 18px; padding: 20px; transition: border-color .25s, transform .25s, box-shadow .25s; }
.card:hover { border-color: #33434f; }

/* ---------- run cards ---------- */
.run { display: flex; flex-direction: column; gap: 13px; --ring: var(--accent); overflow: hidden; }
.run::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px;
               background: linear-gradient(90deg, var(--ring), transparent 80%); opacity: .85; }
.run:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px var(--ring); }
.run.ironmon { --ring: var(--iron); } .run.practice, .run.goal { --ring: var(--info); }
.run.idle, .run.manual { --ring: var(--faint); }
.run .head { display: flex; align-items: center; gap: 13px; }
.avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center;
          background: radial-gradient(circle at 50% 30%, #1d2833, #10161d 75%); border: 2px solid var(--ring); }
.avatar img { width: 42px; height: 42px; object-fit: contain; }
.run .no { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.2; }
.run .tag { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--ring); }
.run .state { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
              padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--faint); }
.run .state.live { color: var(--accent); border-color: rgba(79, 209, 165, .4); background: rgba(79, 209, 165, .07); }
.run .state.fight { color: var(--bad); border-color: rgba(242, 95, 92, .45); background: rgba(242, 95, 92, .08);
                    animation: blink 1.2s infinite; }
.pips { display: flex; gap: 5px; align-items: center; }
.pips i { width: 11px; height: 11px; transform: rotate(45deg); border-radius: 2px; border: 1.5px solid #34424e; }
.pips i.on { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 8px rgba(255, 210, 63, .55); }
.pips span { margin-left: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.run .where { font-size: 13.5px; color: var(--muted); display: flex; gap: 7px; align-items: center; }
.run .where svg { flex: none; opacity: .7; }
.run .detail { font-size: 12.5px; color: var(--faint); line-height: 1.4; }
.quest { background: var(--panel2); border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; }
.quest .q { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.quest .q b { color: var(--text); font-weight: 600; } .quest .q span { color: var(--faint); font-family: var(--mono); font-size: 11px; }
.quest .qbar { margin-top: 7px; height: 4px; border-radius: 3px; background: #1b2531; overflow: hidden; }
.quest .qbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ring), var(--gold)); border-radius: 3px; }
.run .bar { display: flex; gap: 16px; font-family: var(--mono); font-size: 11.5px; color: var(--faint);
            border-top: 1px solid var(--line); padding-top: 11px; margin-top: auto; flex-wrap: wrap; }
.run .bar b { color: var(--text); }
.hp { height: 5px; border-radius: 3px; background: #1b2531; overflow: hidden; }
.hp i { display: block; height: 100%; background: var(--accent); }
.hp i.hurt { background: var(--warn); } .hp i.crit { background: var(--bad); }
.hp i.out { background: var(--bad); opacity: .45; }
.down { font-size: 12px; color: var(--faint); font-style: italic; }

/* ---------- a party: six slots, whatever is in them ---------- */
.team { display: flex; flex-direction: column; gap: 2px; }
.mon { display: grid; grid-template-columns: 34px 1fr auto 74px; gap: 9px; align-items: center;
       padding: 3px 4px; border-radius: 7px; }
.mon:nth-child(odd) { background: rgba(255, 255, 255, .018); }
.mon img { width: 32px; height: 32px; object-fit: contain; }
.mon .noimg { display: block; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .05); }
.mon .who { min-width: 0; }
.mon .nm { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon .sp { font-size: 10px; color: var(--faint); letter-spacing: .4px; text-transform: uppercase;
           white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon .lv { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.mon .hpwrap { display: flex; flex-direction: column; gap: 3px; }
.mon .hpn { font-family: var(--mono); font-size: 10px; color: var(--faint); text-align: right; line-height: 1; }
.mon .sh { font-size: 10px; }
.mon .ail { margin-left: 6px; font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .6px;
            padding: 1px 5px; border-radius: 4px; background: rgba(240, 180, 41, .16); color: var(--gold); }
.mon.fnt img { filter: grayscale(1); opacity: .45; }
.mon.fnt .nm { color: var(--muted); }
.mon.empty { border: 1px dashed rgba(255, 255, 255, .07); background: none; min-height: 34px;
             display: flex; align-items: center; justify-content: center; }
.mon.empty span { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: #3a454f; }

/* ---------- shiny ---------- */
.shiny { position: relative; display: grid; grid-template-columns: 200px 1fr; gap: 34px; align-items: start;
         background: linear-gradient(150deg, #1d1707, #151a20 55%); border: 1px solid #4a3c14; border-radius: 22px;
         padding: 32px; overflow: hidden; }
.shiny::before { content: ""; position: absolute; width: 420px; height: 420px; left: -140px; top: -160px; pointer-events: none;
                 background: radial-gradient(circle, rgba(255, 210, 63, .16), transparent 65%); }
.shiny .who { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 6px; }
.shiny .who .sprite { position: relative; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
                      background: radial-gradient(circle at 50% 35%, #2a230f, #15130c 72%); border: 2px solid rgba(255, 210, 63, .5);
                      box-shadow: 0 0 50px -10px rgba(255, 210, 63, .5); }
.shiny .who img { width: 92px; height: 92px; object-fit: contain; animation: bob 4s ease-in-out infinite; }
.spark { position: absolute; font-size: 17px; animation: twinkle 2.4s ease-in-out infinite; }
.spark.s1 { top: 2px; right: 8px; } .spark.s2 { bottom: 12px; left: 0; animation-delay: .8s; font-size: 13px; }
.spark.s3 { top: 38px; left: -10px; animation-delay: 1.5s; font-size: 11px; }
@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(.7) rotate(0deg) } 50% { opacity: 1; transform: scale(1.15) rotate(18deg) } }
.shiny .nums { display: flex; gap: 36px; flex-wrap: wrap; margin-bottom: 16px; }
.shiny .nums b { display: block; font-family: var(--display); font-size: 33px; font-weight: 700; line-height: 1.1;
                 letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.shiny .nums span { font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.luck { height: 10px; border-radius: 6px; overflow: hidden; margin-bottom: 16px;
        background: linear-gradient(90deg, #1b3a31 0%, #3d3a1a 50%, #4a2326 100%); }
.luck i { display: block; height: 100%; min-width: 6px; border-radius: 6px;
          background: linear-gradient(90deg, rgba(79, 209, 165, .85), rgba(255, 210, 63, .9)); }
.finds { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 16px; }
.find { display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: center; padding: 7px 11px;
        border-radius: 10px; background: rgba(255, 210, 63, .06); border: 1px solid #3a3013; }
.find img { width: 32px; height: 32px; object-fit: contain; }
.find .fn { font-size: 12.5px; font-weight: 600; min-width: 0; }
.find .fw { display: block; font-size: 10px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.find .ft { text-align: right; line-height: 1.15; }
.find .ft b { font-family: var(--mono); font-size: 14px; color: var(--gold); }
.find .ft span { display: block; font-size: 9.5px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.shinyteam .team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 20px; }
.cmdrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- the model ---------- */
.modelgrid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: stretch; }
.tree { display: flex; align-items: flex-start; overflow-x: auto; padding: 8px 0 6px; }
.node { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 126px; text-align: center; }
.node .mark { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: var(--faint); }
.node.win .mark { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 14px rgba(79, 209, 165, .6); }
.node.champ .mark { width: 22px; height: 22px; margin-top: -3px; background: var(--gold); border-color: var(--gold);
                    box-shadow: 0 0 0 5px rgba(255, 210, 63, .12), 0 0 22px rgba(255, 210, 63, .7); }
.node.lose .mark { background: transparent; border-color: var(--bad); position: relative; }
.node.now .mark { background: transparent; border: 2px dashed var(--warn); animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.node .name { font-size: 12.5px; font-weight: 700; }
.node .note { font-size: 11px; color: var(--faint); }
.node.win .note { color: var(--accent); } .node.champ .note { color: var(--gold); }
.node.lose .note { color: var(--bad); } .node.now .note { color: var(--warn); }
.link { flex: 1; height: 2px; background: linear-gradient(90deg, var(--line), #33434f); margin: 7px -8px 0; min-width: 20px; }
.treefoot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; gap: 10px 28px;
            flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.treefoot b { color: var(--text); }
.verdict h3 { font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); font-family: var(--mono);
              font-weight: 600; margin-bottom: 14px; }
.verdict .call { font-family: var(--display); font-size: 24px; font-weight: 700; line-height: 1.15; margin-bottom: 16px; }
.verdict .call.win { color: var(--accent); } .verdict .call.lose { color: var(--bad); } .verdict .call.now { color: var(--gold); }
.duel { display: grid; gap: 10px; }
.duel .row { display: grid; grid-template-columns: 86px 1fr 46px; gap: 10px; align-items: center; font-size: 12px; }
.duel .row span { color: var(--muted); } .duel .row b { font-family: var(--mono); text-align: right; }
.duel .meter { height: 9px; border-radius: 5px; background: #1b2531; overflow: hidden; }
.duel .meter i { display: block; height: 100%; border-radius: 5px; }
.duel .new i { background: linear-gradient(90deg, #14493c, var(--accent)); }
.duel .old i { background: linear-gradient(90deg, #26506b, var(--info)); }
.verdict .fine { margin-top: 14px; font-size: 12px; color: var(--faint); line-height: 1.5; }
.sparkwrap { margin-top: 14px; }
.sparkwrap svg { width: 100%; height: 64px; display: block; }
.sparkwrap .cap { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 4px; }

/* ---------- ironmon ---------- */
.records { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 18px; }
.record { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center;
          background: linear-gradient(150deg, #1c1526, var(--panel) 60%); border: 1px solid #3c2f52; border-radius: 18px; padding: 20px; }
.record .ava { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
               background: radial-gradient(circle at 50% 30%, #2a2038, #14101c 75%); border: 2px solid var(--iron); }
.record .ava img { width: 46px; height: 46px; object-fit: contain; }
.record .rs { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--iron); font-weight: 700; font-family: var(--mono); }
.record .big { font-family: var(--display); font-size: 27px; font-weight: 700; line-height: 1.15; letter-spacing: -.6px; }
.record .sm { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.record .sm b { color: var(--text); }
.graves { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.grave { position: relative; text-align: center; padding: 22px 14px 16px; border-radius: 90px 90px 14px 14px;
         background: linear-gradient(180deg, #1a2029, #11161c); border: 1px solid var(--line);
         transition: transform .25s, border-color .25s; }
.grave:hover { transform: translateY(-4px); border-color: #4a3f5e; }
.grave img { width: 44px; height: 44px; object-fit: contain; filter: grayscale(1) brightness(.85); opacity: .8; }
.grave .rip { font-family: var(--mono); font-size: 9.5px; letter-spacing: 3px; color: var(--faint); margin-bottom: 8px; }
.grave .gn { font-family: var(--display); font-weight: 700; font-size: 15px; margin-top: 6px; }
.grave .gn span { color: var(--faint); font-weight: 500; font-size: 12px; }
.grave .ep { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin: 7px 0 9px; min-height: 50px; font-style: italic; }
.grave .gm { font-family: var(--mono); font-size: 10px; color: var(--faint); letter-spacing: .4px; }
.grave .gm i { font-style: normal; color: var(--iron); }

/* ---------- hall of fame ---------- */
.hall { display: flex; flex-direction: column; gap: 8px; margin-top: 26px; }
.hrow { display: grid; grid-template-columns: 44px 52px 1.2fr 1fr auto; gap: 16px; align-items: center;
        background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px;
        transition: border-color .2s, transform .2s; }
.hrow:hover { transform: translateX(4px); border-color: #33434f; }
.hrow .rank { font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--faint); text-align: center; }
.hrow:first-child { border-color: rgba(255, 210, 63, .4); background: linear-gradient(90deg, rgba(255, 210, 63, .07), var(--panel) 45%); }
.hrow:first-child .rank { color: var(--gold); }
.hrow img { width: 44px; height: 44px; object-fit: contain; }
.hrow .hn { font-weight: 700; font-size: 15px; } .hrow .hn span { color: var(--faint); font-weight: 500; font-size: 12.5px; }
.hrow .hs { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.hrow .hf { font-size: 12.5px; color: var(--muted); } .hrow .hf b { color: var(--text); font-weight: 600; }
.hrow .ht { font-family: var(--mono); font-size: 12px; color: var(--faint); text-align: right; }

/* ---------- chronicle ---------- */
.chron { display: grid; grid-template-columns: 1fr 230px; gap: 34px; align-items: start; padding: 34px;
         background: linear-gradient(160deg, #161d27, var(--panel)); }
.chron h3 { font-size: 28px; letter-spacing: -.8px; margin-bottom: 16px; }
.chron p { font-size: 15.5px; line-height: 1.75; color: #b9c6d2; margin: 0 0 14px; font-family: Georgia, "Times New Roman", serif; }
.chron p:first-of-type::first-letter { font-family: var(--display); font-size: 54px; float: left; line-height: .9;
                                       padding: 5px 10px 0 0; color: var(--accent); font-weight: 700; }
.chron .by { font-size: 12px; color: var(--faint); font-family: var(--mono); margin-top: 6px; }
.chron .facts { display: flex; flex-direction: column; gap: 10px; font-family: var(--mono); font-size: 12.5px;
                color: var(--muted); border-left: 1px solid var(--line); padding-left: 24px; }
.chron .facts b { color: var(--text); font-size: 20px; font-family: var(--display); display: block; }

/* ---------- chat ---------- */
.cmds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cmd { display: flex; align-items: baseline; gap: 12px; padding: 12px 16px; border-radius: 11px;
       background: var(--panel2); border: 1px solid var(--line); transition: border-color .2s; }
.cmd:hover { border-color: rgba(79, 209, 165, .4); }
.cmd code { font-family: var(--mono); font-size: 13px; color: var(--accent); white-space: nowrap; }
.cmd span { font-size: 13px; color: var(--muted); }
/* the shop: channel points buy currency, currency buys actions */
.subhead .sym { color: var(--gold); }
.topups { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.topup { position: relative; display: grid; gap: 4px; padding: 18px 20px; border-radius: 16px;
         background: linear-gradient(150deg, #1d1707, #151a20 60%); border: 1px solid #4a3c14;
         transition: transform .2s, border-color .2s; }
.topup:hover { transform: translateY(-3px); border-color: rgba(255, 210, 63, .55); }
.topup .tt { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); font-family: var(--mono); }
.topup .tg { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -1px; }
.topup .tg b { font-weight: 700; } .topup .tg { color: var(--gold); }
.topup .tc { font-size: 12.5px; color: var(--muted); }
.topup.off::after { content: "not live yet"; position: absolute; top: 14px; right: 16px; font-size: 9.5px;
                     letter-spacing: 1.3px; text-transform: uppercase; color: var(--warn); font-weight: 700; }
.reward .tier { margin-top: auto; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase;
                color: var(--faint); font-family: var(--mono); }
.board { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.brow { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 16px; align-items: center; padding: 10px 16px;
        border-radius: 11px; background: var(--panel2); border: 1px solid var(--line); font-size: 13.5px; }
.brow:first-child { border-color: rgba(255, 210, 63, .35); }
.brow .bi { font-family: var(--display); font-weight: 700; color: var(--faint); text-align: center; }
.brow:first-child .bi { color: var(--gold); }
.brow .bu { font-weight: 600; }
.brow .bb { font-family: var(--mono); font-size: 12.5px; color: var(--gold); }
.brow .bs { font-family: var(--mono); font-size: 12px; color: var(--faint); }

.reward { display: flex; flex-direction: column; gap: 10px; }
.reward:hover { transform: translateY(-3px); }
.reward .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.reward .title { font-family: var(--display); font-weight: 700; font-size: 16px; }
.cost { font-family: var(--mono); font-size: 12.5px; padding: 4px 10px; border-radius: 999px; font-weight: 700;
        background: rgba(79, 209, 165, .12); color: var(--accent); white-space: nowrap; }
.reward.structural .cost { background: rgba(242, 95, 92, .14); color: var(--bad); }
.reward.request .cost { background: rgba(199, 146, 234, .14); color: var(--iron); }
.reward p { margin: 0; font-size: 13px; color: var(--muted); }
.soon { align-self: flex-start; margin-top: auto; font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase;
        font-weight: 700; color: var(--warn); border: 1px solid #4a3f1f; border-radius: 999px; padding: 3px 10px; }

/* ---------- how ---------- */
.how { background: linear-gradient(160deg, #121922, var(--panel2)); border: 1px solid var(--line); border-radius: 22px;
       padding: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.how .n { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-family: var(--display);
          font-weight: 700; margin-bottom: 14px; }
.how h4 { font-size: 17.5px; margin-bottom: 8px; }
.how p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---------- the shop: account, dialog, buy buttons ---------- */
.acct { display: flex; align-items: center; gap: 10px; }
.acct .bal { font-family: var(--mono); font-size: 13px; color: var(--gold); font-weight: 600; white-space: nowrap; }
.acct .who { font-size: 13px; font-weight: 600; max-width: 130px; overflow: hidden; text-overflow: ellipsis;
             white-space: nowrap; }
.acct .out { font-size: 11.5px; color: var(--faint); cursor: pointer; background: none; border: 0; padding: 2px 4px;
             font-family: inherit; }
.acct .out:hover { color: var(--text); }
.btn.twitch { background: #9146FF; color: #fff; box-shadow: 0 6px 22px -10px #9146FF; }
.authhelp { position: absolute; right: 24px; top: 62px; z-index: 40; width: min(420px, 90vw); display: grid; gap: 8px;
            padding: 16px 18px; border-radius: 14px; background: var(--panel); border: 1px solid rgba(240,180,41,.45);
            box-shadow: 0 20px 50px -20px #000; font-size: 13px; color: var(--muted); text-align: left; }
.authhelp b { color: var(--gold); font-size: 13.5px; }
.authhelp code { font-family: var(--mono); font-size: 12px; color: var(--accent); background: var(--panel2);
                 border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; word-break: break-all;
                 user-select: all; }
.authhelp .out { justify-self: start; }

.reward .buy { margin-top: auto; align-self: flex-start; padding: 8px 16px; border-radius: 9px; font-size: 12.5px;
               font-weight: 700; font-family: inherit; cursor: pointer; border: 1px solid rgba(79,209,165,.45);
               background: rgba(79,209,165,.1); color: var(--accent); transition: background .15s, transform .15s; }
.reward .buy:hover { background: rgba(79,209,165,.2); transform: translateY(-1px); }
.reward .buy[disabled] { opacity: .45; cursor: default; transform: none; }

/* a party row you can act on */
.mon.act { cursor: pointer; }
.mon.act:hover { background: rgba(79, 209, 165, .07); outline: 1px solid rgba(79, 209, 165, .25); }
.mon .own { font-size: 9.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--iron); margin-left: 6px; }
.mon .own.me { color: var(--accent); }

dialog#dlg { border: 1px solid var(--line); background: linear-gradient(180deg, #151d26, var(--panel));
             color: var(--text); border-radius: 18px; padding: 26px; width: min(440px, 92vw); font-family: var(--sans); }
dialog#dlg::backdrop { background: rgba(4, 8, 12, .72); backdrop-filter: blur(3px); }
dialog#dlg h3 { font-size: 21px; margin-bottom: 6px; }
.dlgblurb { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }
dialog#dlg label { display: block; font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase;
                   color: var(--muted); margin: 12px 0 6px; font-family: var(--mono); }
dialog#dlg select, dialog#dlg input[type=text] { width: 100%; padding: 10px 12px; border-radius: 10px;
        background: var(--panel2); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 14px; }
dialog#dlg select:focus, dialog#dlg input:focus { outline: none; border-color: rgba(79, 209, 165, .55); }
.picklist { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; margin-top: 6px; }
.pick { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px;
        border-radius: 9px; border: 1px solid transparent; cursor: pointer; background: var(--panel2); text-align: left;
        font: inherit; color: inherit; }
.pick:hover { border-color: rgba(79, 209, 165, .4); }
.pick[aria-pressed=true] { border-color: var(--accent); background: rgba(79, 209, 165, .1); }
.pick img { width: 30px; height: 30px; object-fit: contain; }
.pick .pn { font-size: 13px; font-weight: 600; } .pick .ps { font-size: 10.5px; color: var(--faint); }
.pick .pt { font-size: 10.5px; color: var(--iron); font-family: var(--mono); }
.pick[disabled] { opacity: .5; cursor: default; }
.dlgfoot { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.dlgprice { margin-right: auto; font-family: var(--mono); font-size: 13px; color: var(--gold); }
.dlgerr { margin-top: 14px; padding: 10px 12px; border-radius: 9px; font-size: 13px;
          background: rgba(242, 95, 92, .12); border: 1px solid rgba(242, 95, 92, .4); color: #ffb3b1; }
.dlgerr.good { background: rgba(79, 209, 165, .1); border-color: rgba(79, 209, 165, .4); color: #8ef0cd; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 48px; background: var(--panel2); }
footer .cols { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer .about { max-width: 340px; font-size: 12.5px; color: var(--faint); }
footer .col { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
footer .col .eyebrow { margin-bottom: 2px; color: var(--faint); }
footer .col a { color: var(--muted); } footer .col a:hover { color: var(--text); }
footer .fine { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11.5px;
               color: var(--faint); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .herogrid { grid-template-columns: 1fr; gap: 56px; }
  .pitch { text-align: center; } .hero p.lede { margin-inline: auto; } .hero .cta { justify-content: center; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .graves { grid-template-columns: repeat(2, 1fr); }
  .modelgrid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .nav .links { display: none; }
  .grid3, .how, .cmds { grid-template-columns: 1fr; }
  .shiny, .chron { grid-template-columns: 1fr; }
  .chron .facts { border-left: 0; padding-left: 0; flex-direction: row; flex-wrap: wrap; gap: 18px; }
  .shiny { padding: 22px; }
  .shinyteam .team { grid-template-columns: 1fr; }
  .hrow { grid-template-columns: 30px 44px 1fr; } .hrow .hf, .hrow .ht { display: none; }
  section { padding-bottom: 68px; }
  .hero { padding-top: 44px; }
  .ticker { margin-bottom: 60px; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .graves { grid-template-columns: 1fr 1fr; gap: 8px; }
  .orb .tag { font-size: 8.5px; }
  .pill { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* buying one off its owner: the dialog is mostly words, so give them room to be read */
.offer p { margin: 0 0 .6rem; line-height: 1.55; }
.offer p:last-child { margin-bottom: 0; color: var(--muted); }

/* PKMN Storage: what a viewer has kept, one card per Pokemon, with the filters in a bar above */
.storagebar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; }
.storagebar .count { font-size: 13px; color: var(--muted); margin-right: auto; }
.storagebar .count b { color: var(--text); font-family: var(--display); font-size: 16px; }
.storagebar input, .storagebar select { background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 13px; min-width: 150px; }
.storagebar input:focus, .storagebar select:focus { outline: none; border-color: var(--accent); }
.storage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stored { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; padding: 14px;
  background: linear-gradient(180deg, #151d26, var(--panel)); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.stored.shiny { border-color: rgba(255, 210, 63, .45); }
.stored.display { opacity: .75; }
.stored .pic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.stored .pic img { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; }
.stored .noimg { display: block; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .05); }
.stored .body { min-width: 0; }
.stored .nm { font-family: var(--display); font-weight: 700; font-size: 15px; }
.stored .sp { display: block; font-size: 11px; color: var(--muted); letter-spacing: .3px; margin-top: 2px; }
.stored .moves { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.stored .moves span { font-size: 10.5px; padding: 3px 8px; border-radius: 999px; background: rgba(79, 209, 165, .1);
  color: var(--accent); border: 1px solid rgba(79, 209, 165, .25); white-space: nowrap; }
.stored .ivs { display: flex; gap: 8px; margin-top: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.stored .ivs i { font-style: normal; color: var(--faint); margin-right: 3px; text-transform: uppercase; font-size: 9px; }
.stored .foot { margin-top: 8px; font-family: var(--mono); font-size: 10px; color: var(--faint); letter-spacing: .3px; }
.storageempty { padding: 26px; text-align: center; }
.storageempty p { color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
@media (max-width: 900px) { .storage { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .storage { grid-template-columns: 1fr; } .storagebar input, .storagebar select { min-width: 0; flex: 1 1 40%; } }
