/* ScanDex mobile — shared stylesheet for the simplified mobile site
   (mobile/index.html, collection.html, sell.html, help.html).

   Deliberately NOT the desktop style.css (1882 lines, 11 font-weight
   fetches, hover-driven decoration meant for a mouse). This file is the
   whole visual system for the mobile site: tokens, header, bottom tab
   bar, cards, accordions, forms, and a bottom-sheet modal pattern that
   suits touch and small screens instead of being a cut-down version of
   the desktop layout. Same brand tokens as style.css's :root (colors)
   so the mobile site still reads as ScanDex, not a different product. */

:root{
  --red:#B71C1C; --red-mid:#d12a2a;
  --gold:#FFD54F; --gold-hot:#FFE793;
  --bg:#05070b; --bg-1:#0b1018; --bg-2:#111827;
  --glass:rgba(255,255,255,.05); --glass-2:rgba(255,255,255,.08);
  --border:rgba(255,255,255,.10); --border-gold:rgba(255,213,79,.28);
  --text:#F6F2EA; --text-2:#b8c0cc; --text-3:#7f8a99;
  --bad:#ef5350; --good:#4ade80;
  --r:16px; --r-sm:10px;
  --header-h:56px; --tabbar-h:64px;
  --safe-b:env(safe-area-inset-bottom,0px);
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;min-height:100vh;background:var(--bg);color:var(--text);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;
  line-height:1.55;-webkit-font-smoothing:antialiased;
  padding-top:var(--header-h);
  padding-bottom:calc(var(--tabbar-h) + var(--safe-b));
}
a{color:inherit}
img{max-width:100%;display:block}
button{font-family:inherit}

/* ---------- Header ---------- */
.m-header{
  position:fixed;top:0;left:0;right:0;height:var(--header-h);z-index:40;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:0 16px;background:rgba(5,7,11,.88);backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}
.m-brand{display:flex;align-items:center;gap:8px;font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:1.02rem;text-decoration:none}
.m-brand .dot{width:9px;height:9px;border-radius:50%;background:linear-gradient(135deg,var(--gold),var(--red-mid))}
.m-brand .scan{color:var(--text)}
.m-brand .dex{color:var(--gold)}
.m-header-title{font-size:.78rem;color:var(--text-3);text-transform:uppercase;letter-spacing:.06em}
.m-header-action{font-size:.82rem;font-weight:600;color:var(--gold);text-decoration:none;white-space:nowrap}

/* ---------- Bottom tab bar ---------- */
.m-tabbar{
  position:fixed;left:0;right:0;bottom:0;z-index:40;height:calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom:var(--safe-b);
  display:flex;background:rgba(9,11,16,.94);backdrop-filter:blur(10px);
  border-top:1px solid var(--border);
}
.m-tab{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  text-decoration:none;color:var(--text-3);font-size:.68rem;font-weight:600;letter-spacing:.01em;
  -webkit-tap-highlight-color:transparent;
}
.m-tab .ic{font-size:1.22rem;line-height:1}
.m-tab.active{color:var(--gold)}
.m-tab.active .ic{filter:drop-shadow(0 0 8px rgba(255,213,79,.35))}

/* ---------- Layout ---------- */
.m-page{max-width:560px;margin:0 auto;padding:18px 16px 8px}
.m-section{margin-bottom:26px}
.m-section-title{font-family:'Space Grotesk',sans-serif;font-size:1.02rem;font-weight:700;margin:0 0 12px}
.m-eyebrow{font-size:.7rem;font-weight:700;color:var(--gold);text-transform:uppercase;letter-spacing:.08em;margin-bottom:6px}
.m-muted{color:var(--text-3)}
.m-center{text-align:center}
.m-hr{border:0;border-top:1px solid var(--border);margin:22px 0}

/* ---------- Buttons ---------- */
.m-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  width:100%;padding:14px 18px;border-radius:12px;border:1px solid var(--border);
  background:var(--glass);color:var(--text);font-size:.92rem;font-weight:700;
  cursor:pointer;text-decoration:none;-webkit-tap-highlight-color:transparent;
}
.m-btn:disabled{opacity:.55}
.m-btn-gold{background:linear-gradient(90deg,var(--gold),var(--gold-hot));border-color:transparent;color:#1a1400}
.m-btn-red{background:var(--red);border-color:var(--red);color:#fff}
.m-btn-ghost{background:transparent}
.m-btn-sm{width:auto;padding:9px 14px;font-size:.82rem;border-radius:10px}
.m-btn-row{display:flex;gap:10px}
.m-btn-row .m-btn{width:auto;flex:1}

/* ---------- Forms ---------- */
.m-field{margin-bottom:14px}
.m-field label{display:block;font-size:.78rem;color:var(--text-3);margin-bottom:6px}
.m-field input,.m-field select,.m-field textarea{
  width:100%;font-family:inherit;font-size:.95rem;color:var(--text);
  background:var(--glass);border:1px solid var(--border);border-radius:11px;
  padding:13px 14px;outline:none;color-scheme:dark;
}
.m-field input:focus,.m-field select:focus,.m-field textarea:focus{border-color:var(--border-gold)}
.m-field select option{background:#161a22;color:var(--text)}
.m-hint{font-size:.76rem;color:var(--text-3);margin-top:6px}
.m-err{color:var(--bad);font-size:.82rem;margin-top:10px;min-height:1.2em}
.m-ok{color:var(--good);font-size:.82rem;margin-top:10px;min-height:1.2em}
.m-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0}
.m-toggle-row .lbl{font-size:.88rem}
.m-toggle-row .sub{font-size:.76rem;color:var(--text-3);margin-top:2px}
.m-switch{position:relative;width:42px;height:24px;border-radius:99px;background:var(--glass-2);border:1px solid var(--border);flex-shrink:0;cursor:pointer}
.m-switch::after{content:'';position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:var(--text-3);transition:transform .15s var(--ease,ease),background .15s}
.m-switch.on{background:rgba(255,213,79,.22);border-color:var(--border-gold)}
.m-switch.on::after{transform:translateX(18px);background:var(--gold)}

/* Segmented tabs (used for Sign in / Create account) */
.m-segment{display:flex;background:var(--glass);border:1px solid var(--border);border-radius:12px;padding:4px;margin-bottom:18px}
.m-segment button{flex:1;padding:10px;border:0;border-radius:9px;background:transparent;color:var(--text-3);font-weight:700;font-size:.86rem;cursor:pointer}
.m-segment button.active{background:var(--gold);color:#1a1400}

/* ---------- Cards / grid ---------- */
.m-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.m-card{
  background:var(--glass);border:1px solid var(--border);border-radius:12px;overflow:hidden;
  position:relative;cursor:pointer;-webkit-tap-highlight-color:transparent;
}
.m-card img{width:100%;aspect-ratio:5/7;object-fit:cover;background:var(--bg-2)}
.m-card .body{padding:7px 8px}
.m-card .name{font-size:.72rem;font-weight:600;line-height:1.25;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.m-card .sub{font-size:.64rem;color:var(--text-3);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-card .qty{position:absolute;top:6px;right:6px;background:rgba(0,0,0,.7);color:var(--gold);
  font-size:.62rem;font-weight:700;padding:2px 6px;border-radius:99px;z-index:2}
.m-card .price{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(0deg,rgba(0,0,0,.82),transparent);
  color:var(--gold-hot);font-size:.68rem;font-weight:700;padding:14px 7px 5px;z-index:1}

/* ---------- Accordion (games list, FAQ, policy sections) ---------- */
.m-acc{border:1px solid var(--border);border-radius:14px;margin-bottom:10px;overflow:hidden;background:var(--glass)}
.m-acc-head{
  display:flex;align-items:center;gap:10px;padding:14px 14px;cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.m-acc-dot{width:9px;height:9px;border-radius:50%;background:var(--game-accent,var(--gold));flex-shrink:0}
.m-acc-head h3{margin:0;font-size:.9rem;font-weight:700;flex:1;min-width:0}
.m-acc-count{font-size:.72rem;color:var(--text-3);flex-shrink:0}
.m-acc-chevron{color:var(--text-3);transition:transform .15s;flex-shrink:0;font-size:.85rem}
.m-acc.open .m-acc-chevron{transform:rotate(90deg)}
.m-acc-body{display:none;padding:0 14px 14px}
.m-acc.open .m-acc-body{display:block}
.m-acc-q{width:100%;text-align:left;background:transparent;border:0;border-top:1px solid var(--border);
  padding:13px 0;color:var(--text);font-size:.85rem;font-weight:600;display:flex;justify-content:space-between;gap:10px;cursor:pointer}
.m-acc-q:first-child{border-top:0}
.m-acc-q .car{color:var(--text-3);transition:transform .15s;flex-shrink:0}
.m-acc-q.open .car{transform:rotate(45deg)}
.m-acc-a{display:none;padding:0 0 14px;color:var(--text-2);font-size:.83rem;line-height:1.6}
.m-acc-a.open{display:block}

/* ---------- Bottom-sheet modal ---------- */
.m-sheet-overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:60;display:none;
}
.m-sheet-overlay.open{display:block}
.m-sheet{
  position:fixed;left:0;right:0;bottom:0;z-index:61;max-height:88vh;overflow-y:auto;
  background:var(--bg-1);border-top:1px solid var(--border);border-radius:20px 20px 0 0;
  padding:10px 18px calc(24px + var(--safe-b));
  transform:translateY(100%);transition:transform .22s var(--ease,ease);
}
.m-sheet-overlay.open .m-sheet{transform:translateY(0)}
.m-sheet-handle{width:36px;height:4px;border-radius:99px;background:var(--border);margin:6px auto 14px}
.m-sheet-close{position:absolute;top:14px;right:16px;background:var(--glass);border:1px solid var(--border);
  color:var(--text-2);width:30px;height:30px;border-radius:50%;font-size:.9rem;cursor:pointer}
.m-sheet img.art{width:100%;max-width:220px;margin:0 auto 14px;border-radius:12px;display:block;aspect-ratio:5/7;object-fit:contain;background:var(--bg-2)}
.m-sheet h2{font-size:1.1rem;margin:0 0 2px}
.m-sheet .sub{color:var(--text-3);font-size:.82rem;margin-bottom:16px}
.m-sheet .time{font-size:.72rem;color:var(--text-3);opacity:.8}

/* ---------- Misc ---------- */
.m-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:22px}
.m-kpi{background:var(--glass);border:1px solid var(--border);border-radius:12px;padding:12px 10px;text-align:center}
.m-kpi .v{font-family:'Space Grotesk',sans-serif;font-size:1.15rem;font-weight:700;color:var(--gold)}
.m-kpi .l{font-size:.66rem;color:var(--text-3);margin-top:2px;text-transform:uppercase;letter-spacing:.04em}
.m-empty{text-align:center;padding:44px 16px;color:var(--text-3);font-size:.88rem}
.m-spinner{display:inline-block;width:15px;height:15px;border-radius:50%;border:2px solid var(--border);
  border-top-color:var(--gold);animation:m-spin .8s linear infinite;vertical-align:-3px;margin-right:7px}
@keyframes m-spin{to{transform:rotate(360deg)}}
.m-loading{text-align:center;padding:50px 0;color:var(--text-3);font-size:.88rem}
.m-search{position:relative;margin-bottom:16px}
.m-search input{width:100%;font-family:inherit;font-size:.9rem;color:var(--text);background:var(--glass);
  border:1px solid var(--border);border-radius:12px;padding:12px 14px 12px 38px;outline:none}
.m-search input:focus{border-color:var(--border-gold)}
.m-search .ic{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--text-3);font-size:.85rem}
.m-pill{display:inline-flex;align-items:center;gap:5px;background:var(--glass);border:1px solid var(--border);
  border-radius:99px;padding:5px 11px;font-size:.72rem;color:var(--text-2);text-decoration:none}
.m-pill-dot{width:7px;height:7px;border-radius:50%}
.m-store-tiles{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.m-store-tile{display:flex;flex-direction:column;align-items:center;gap:5px;width:60px;text-decoration:none}
.m-store-tile .mark{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;
  font-weight:800;font-size:.78rem;color:#fff}
.m-store-tile .lbl{font-size:.62rem;color:var(--text-3);text-align:center}
.m-foot{max-width:560px;margin:8px auto 0;padding:20px 16px 4px;text-align:center}
.m-foot-links{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;font-size:.78rem;margin-bottom:10px}
.m-foot-links a{color:var(--text-3);text-decoration:none}
.m-foot-copy{font-size:.72rem;color:var(--text-3)}
.m-view-desktop{display:block;text-align:center;font-size:.76rem;color:var(--text-3);margin-top:16px;text-decoration:underline;text-underline-offset:3px}
.m-checkgrid{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.m-check{display:flex;align-items:center;gap:6px;background:var(--glass);border:1px solid var(--border);
  border-radius:99px;padding:7px 12px;font-size:.78rem;cursor:pointer;-webkit-tap-highlight-color:transparent}
.m-check.on{border-color:var(--border-gold);background:rgba(255,213,79,.1);color:var(--gold-hot)}

/* ---------- Live feed (mobile/live.html + the index preview strip) ----------
   Deliberately zero @keyframes / animated backgrounds here — the desktop
   social.html's continuously-animated foil/glow decoration (background-
   position + transform animations running on every card tile) is what
   made scrolling stutter on phones; the mobile feed is plain, static
   rows with a one-shot fade-in on new items instead. */
.m-stats-row{display:flex;gap:8px;margin-bottom:16px}
.m-stat-chip{flex:1;background:var(--glass);border:1px solid var(--border);border-radius:12px;padding:10px 8px;text-align:center}
.m-stat-chip .v{font-family:'Space Grotesk',sans-serif;font-size:1.05rem;font-weight:700;color:var(--gold)}
.m-stat-chip .l{font-size:.62rem;color:var(--text-3);text-transform:uppercase;letter-spacing:.04em;margin-top:2px}
.m-feed-list{display:flex;flex-direction:column;gap:2px}
.m-feed-row{display:flex;align-items:center;gap:11px;padding:10px 4px;border-top:1px solid var(--border);cursor:pointer;-webkit-tap-highlight-color:transparent}
.m-feed-row:active{background:var(--glass)}
.m-feed-list .m-feed-row:first-child{border-top:0}
.m-feed-row img{width:34px;height:47px;min-width:34px;max-width:34px;max-height:47px;border-radius:6px;object-fit:cover;
  background:var(--bg-2);border:1px solid var(--border);flex-shrink:0}
.m-feed-row .info{flex:1;min-width:0}
.m-feed-row .name{font-size:.82rem;font-weight:600;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-feed-row .meta{font-size:.7rem;color:var(--text-3);margin-top:3px;display:flex;align-items:center;gap:6px;min-width:0}
.m-feed-row .dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}
.m-feed-row .game-badge{flex-shrink:0;font-size:.62rem;font-weight:700;color:var(--bg);background:var(--b,var(--gold));
  padding:2px 7px;border-radius:99px;letter-spacing:.01em;white-space:nowrap}
.m-feed-row .loc{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.m-feed-row .time{font-size:.64rem;color:var(--text-3);opacity:.8;margin-top:2px}
.m-like-btn{display:flex;align-items:center;gap:5px;background:var(--glass);
  border:1px solid var(--border);border-radius:999px;color:var(--text-2);
  font-size:.74rem;font-weight:700;cursor:pointer;flex-shrink:0;padding:7px 11px;
  -webkit-tap-highlight-color:transparent;transition:background .15s ease,border-color .15s ease,color .15s ease}
.m-like-btn .heart{font-size:.9rem;line-height:1}
.m-like-btn:active{transform:scale(.94)}
.m-like-btn.liked{color:#ff5e7e;border-color:rgba(255,94,126,.5);background:rgba(255,94,126,.14)}
.m-like-btn .heart.pop{animation:m-heart-pop .42s ease}
@keyframes m-heart-pop{0%{transform:scale(1)}40%{transform:scale(1.5) rotate(-8deg)}100%{transform:scale(1)}}
.m-feed-new{animation:m-fade-in .4s ease}
@keyframes m-fade-in{from{opacity:0}to{opacity:1}}
.m-preview-strip .m-feed-row img{width:28px;height:39px;min-width:28px;max-width:28px;max-height:39px}
.m-preview-strip .m-feed-row{padding:8px 4px}
