{"ok":true,"service":"grid-ccg-proto backend","db":"postgres","version":"1.0.0","uptimeSec":1353526,"cards":81,"pools":4,"shopItems":8,"tasks":23,"gameplayConfig":true,"endpoints":["GET    /privacy               -> ZODIA privacy policy (HTML)","GET    /support               -> ZODIA support page (HTML)","GET    /healthz              -> liveness probe { ok, status:alive }","GET    /readyz               -> readiness probe { ok, status:ready } (pings DB)","POST   /api/login            { uid?, guestSecret?, name? } -> guest session + rotated token","DELETE /api/account          (auth) -> permanently delete account and game data","POST   /api/auth/register    { username, password, name?, deviceId? } -> { token, refreshToken, recoveryCode, profile }","POST   /api/auth/bind        (auth) { username, password, deviceId? } -> { bound, recoveryCode, profile }","POST   /api/auth/login       { username, password } | { username, recoveryCode } | { deviceId } -> { token, refreshToken, profile }","POST   /api/auth/refresh     { refreshToken } -> { token, refreshToken, expiresAt }","GET    /api/profile          (auth) -> { profile }","GET    /api/campaign         (auth) -> { content, progress, profile }","POST   /api/campaign/start   (auth) { stageId } -> authoritative session + deterministic seed","POST   /api/campaign/complete(auth) { sessionId, result, turns, leaderHp, actions? } -> stars + rewards + progress","POST   /api/campaign/abandon (auth) { sessionId } -> clear active session","POST   /api/campaign/sweep   (auth) { stageId, count? } -> consume stamina + repeat rewards","GET    /api/cards            -> all card defs + localised names","GET    /api/gameplay-config  -> gameplay balance config (elements/cost curve/keywords/fusion/awaken)","GET    /api/collection       (auth) -> owned cards","POST   /api/collection/evolve(auth) { cardId } -> consume card shards + coin, raise star","GET    /api/gacha/pools      -> pool list + rates","POST   /api/gacha/pull       (auth) { poolId, count } -> pulled cards","GET    /api/gear/catalog     -> bead/weapon catalog + pools (server source of truth)","POST   /api/gear/pull        (auth) { type:bead|weapon, poolId, count } -> { pulled[], balance, pity }","POST   /api/gear/reroll      (auth) { instId } -> { value, balance } (costs 50 diamond)","GET    /api/gear             (auth) -> { beads[], weapons[], equips:{ [cardId]:{bead[3],weapon} } }","POST   /api/equip            (auth) { cardId, slotType, slotIdx, instId } -> updated equips","DELETE /api/equip?cardId=&slotType=&slotIdx= (auth) -> { removed, equips }","GET    /api/decks            (auth) -> decks","POST   /api/decks            (auth) { id?, name, cards[<=30] } -> deck","POST   /api/decks/activate   (auth) { id, slot:active|defense } -> selected loadouts","DELETE /api/decks?id=        (auth) -> deleted","GET    /api/shop             -> shop items","POST   /api/shop/buy         (auth) { itemId, qty? } -> result","GET    /api/tasks            -> tasks (+claimed if auth)","POST   /api/tasks/claim      (auth) { taskId } | { all:true } -> granted","GET    /api/checkin          (auth) -> server daily state + next reward","POST   /api/checkin/claim    (auth) -> one daily reward (idempotent by HK date)","GET    /api/battlepass       (auth) -> season XP, tier, tracks, claimed rewards","POST   /api/battlepass/buy   (auth) { seasonId } -> premium track entitlement","POST   /api/battlepass/claim (auth) { track,tier } | { all:true } -> rewards","GET    /api/homeland         (auth) -> authoritative facilities, idle bank, inventory","POST   /api/homeland/upgrade (auth) { facility } -> spend coin + start construction","POST   /api/homeland/collect (auth) -> collect all accumulated resources","POST   /api/match/start       (auth) { mode:casual } -> server match ticket + deterministic seed","GET    /api/ranked           (auth) -> rank + persisted leaderboard + nearby player defense opponent","POST   /api/ranked           (auth) -> matched opponent + matchId","POST   /api/match/result     (auth) { win, mode?:casual|ranked|friendly, actions?, matchId?, deckId?, result?, score?, durationSec? } -> rewards (daily-capped, rank-capped, idempotent, rate-guarded, payload-sanity-checked) + new rank","POST   /api/iap/validate     (auth) { platform:apple|google, productId, receipt } -> { granted, balance, profile } (server-authoritative, dedupes receipts; verify gated by IAP_VERIFY_MODE)","POST   /api/friends/request  (auth) { playerId(uid|code) } -> { status }","POST   /api/friends/accept   (auth) { playerId } -> { status:accepted }","GET    /api/friends          (auth) -> { friends[], incoming[], outgoing[], online/lastSeen }","DELETE /api/friends?playerId= (auth) -> { removed }","POST   /api/friends/battle   (auth) { playerId, mode?:battle|visit } -> asynchronous defense-deck match","GET    /api/mail             (auth) -> { mail[], unclaimed }","POST   /api/mail/read        (auth) { mailId } -> { mailId, read }","POST   /api/mail/claim       (auth) { mailId? } -> { granted, balance } (omit mailId = claim all)"]}