:root { --bg:#0f1420; --card:#1a2233; --text:#eef2f7; --muted:#93a0b4; --accent:#2aabee; --ok:#34c77b; --bad:#e5484d; }
/* Telegram theme bridge: applyTheme() sets --tg-* from themeParams; they
   override the defaults below so the Mini App feels native in any client. */
body[data-scheme] { background:var(--tg-bg, var(--bg)); color:var(--tg-text, var(--text)); }
body[data-scheme="light"] { --bg:#ffffff; --card:#f2f4f7; --text:#111111; --muted:#6b7686; }
* { box-sizing:border-box; }
body { margin:0; font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; background:var(--bg); color:var(--text); padding-bottom:76px; }
.topbar { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; background:#141b2b; position:sticky; top:0; z-index:10; border-bottom:1px solid #263049; }
.brand { display:flex; gap:10px; align-items:center; }
.logo { width:38px; height:38px; border-radius:10px; background:#263049; display:flex; align-items:center; justify-content:center; font-size:20px; overflow:hidden; }
.logo img { width:100%; height:100%; object-fit:cover; }
.store-name { font-weight:700; }
.store-slug { color:var(--muted); font-size:12px; }
.icon-btn { background:none; border:1px solid #2c3a57; color:var(--text); border-radius:8px; padding:6px 10px; cursor:pointer; }
.api-bar { display:flex; gap:8px; padding:10px 14px; background:#182136; }
.api-bar.hidden { display:none; }
.api-bar input { flex:1; background:#0d1322; border:1px solid #2c3a57; color:var(--text); border-radius:8px; padding:8px; }
main { padding:14px; max-width:640px; margin:0 auto; }
.hidden { display:none !important; }
.grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.card { background:var(--card); border:1px solid #263049; border-radius:12px; overflow:hidden; cursor:pointer; }
.card img { width:100%; height:130px; object-fit:cover; display:block; background:#0d1322; }
.card .p { padding:10px; }
.card .t { font-weight:600; font-size:14px; }
.card .pr { color:var(--accent); font-weight:700; margin-top:4px; }
.chips { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0; }
.chip { border:1px solid #2c3a57; background:#182136; color:var(--text); border-radius:999px; padding:7px 12px; cursor:pointer; }
.chip.on { background:var(--accent); border-color:var(--accent); color:#04222f; font-weight:700; }
.search { width:100%; background:#0d1322; border:1px solid #2c3a57; color:var(--text); border-radius:10px; padding:10px; margin:6px 0 4px; }
.btn { background:var(--accent); color:#04222f; border:none; border-radius:10px; padding:12px 16px; font-weight:700; cursor:pointer; width:100%; margin-top:10px; }
.btn.small { width:auto; margin-top:0; padding:8px 12px; }
.btn.ghost { background:#22304d; color:var(--text); }
.btn.warn { background:#3a2330; color:#ffb3ba; border:1px solid var(--bad); }
.detail img.cover { width:100%; border-radius:12px; max-height:300px; object-fit:cover; background:#0d1322; }
.gallery { display:flex; gap:8px; margin-top:8px; overflow-x:auto; }
.gallery img { width:84px; height:84px; object-fit:cover; border-radius:8px; cursor:pointer; border:2px solid transparent; }
.gallery img.on { border-color:var(--accent); }
.muted { color:var(--muted); }
.price { font-size:22px; font-weight:800; color:var(--accent); margin:8px 0; }
.provider { display:flex; gap:10px; }
.provider button { flex:1; padding:14px; border-radius:12px; border:2px solid #2c3a57; background:#182136; color:var(--text); cursor:pointer; font-weight:700; }
.provider button.on { border-color:var(--accent); background:#123246; }
.tabbar { position:fixed; bottom:0; left:0; right:0; display:flex; background:#141b2b; border-top:1px solid #263049; padding-bottom:env(safe-area-inset-bottom); }
.tab { flex:1; background:none; border:none; color:var(--muted); padding:10px 0; cursor:pointer; display:flex; flex-direction:column; align-items:center; font-size:18px; }
.tab span { font-size:11px; margin-top:2px; }
.tab.active { color:var(--accent); }
.list { display:flex; flex-direction:column; gap:10px; }
.row { background:var(--card); border:1px solid #263049; border-radius:12px; padding:12px; display:flex; gap:10px; align-items:center; cursor:pointer; }
.row img { width:52px; height:52px; border-radius:8px; object-fit:cover; }
.badge { display:inline-block; font-size:11px; padding:3px 8px; border-radius:999px; background:#22304d; }
.badge.ok { background:#123c2a; color:#7be2ab; }
.badge.pend { background:#3d2f12; color:#ffd88a; }
.toasts { position:fixed; bottom:84px; left:0; right:0; display:flex; flex-direction:column; align-items:center; gap:8px; pointer-events:none; z-index:50; }
.toast { background:#222d47; border:1px solid #33415f; padding:10px 14px; border-radius:10px; max-width:90vw; }
.spinner { color:var(--muted); padding:12px; text-align:center; }
video, audio { width:100%; margin-top:8px; }
a.paylink { display:block; text-align:center; margin-top:10px; color:var(--accent); }
