/* =========================================================
   OnePay Draws — demo stylesheet
   ========================================================= */

:root{
  --bg:#f5f6fb;
  --surface:#ffffff;
  --surface-2:#f3f5fa;
  --surface-3:#eef1f8;
  --text:#0f172a;
  --muted:#64748b;
  --faint:#94a3b8;
  --line:#e5e9f2;
  --line-2:#eef1f7;

  --brand:#4f46e5;
  --brand-600:#4338ca;
  --brand-700:#3730a3;
  --brand-50:#eef2ff;
  --pink:#ec4899;
  --mint:#0fa968;
  --mint-50:#e8f8f1;
  --amber:#d97706;
  --amber-50:#fef6e7;
  --red:#dc2626;
  --red-50:#fdecec;

  --grad:linear-gradient(135deg,#6366f1 0%,#8b5cf6 48%,#ec4899 100%);
  --grad-soft:linear-gradient(135deg,#eef2ff 0%,#f5f0ff 55%,#fdeef6 100%);

  --r-xs:8px;
  --r-sm:10px;
  --r:14px;
  --r-lg:20px;
  --r-xl:28px;

  --sh-1:0 1px 2px rgba(16,24,40,.05);
  --sh-2:0 6px 18px rgba(16,24,40,.06);
  --sh-3:0 18px 44px rgba(16,24,40,.12);

  --maxw:1280px;
  --hdr-h:66px;
  /* opaque-with-alpha fallbacks (no color-mix — older iOS/Android WebView) */
  --hdr-bg:rgba(255,255,255,.88);
  --tab-bg:rgba(255,255,255,.94);
  /* is set to the real viewport height by JS (mobile browser chrome safe) */
  --vh:1vh;
}

[data-theme="dark"]{
  --bg:#0b1020;
  --surface:#121a2e;
  --surface-2:#172136;
  --surface-3:#1d2942;
  --text:#eef2f9;
  --muted:#9aa8c2;
  --faint:#74839d;
  --line:#233052;
  --line-2:#1b2740;
  --brand-50:#1c2144;
  --brand:#7c83f5;
  --brand-600:#8b90ff;
  --brand-700:#a6aaff;
  --mint-50:#10281f;
  --amber-50:#2c2313;
  --red-50:#2d1618;
  --grad:linear-gradient(135deg,#6366f1 0%,#a855f7 48%,#f472b6 100%);
  --grad-soft:linear-gradient(135deg,#141a33 0%,#1b1734 55%,#241826 100%);
  --sh-2:0 6px 18px rgba(0,0,0,.35);
  --sh-3:0 18px 44px rgba(0,0,0,.5);
  --hdr-bg:rgba(18,26,46,.9);
  --tab-bg:rgba(18,26,46,.95);
}

*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  background:var(--bg);
  color:var(--text);
  font-family:"Inter","Segoe UI",system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif;
  font-size:15px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  padding-bottom:env(safe-area-inset-bottom);
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4,h5{margin:0;line-height:1.2;letter-spacing:-.02em;font-weight:700}
p{margin:0}
ul,ol{margin:0;padding-left:20px}
button{font:inherit;color:inherit}
input,select,textarea{font:inherit;color:inherit}
svg{display:block}

.skip-link{
  position:absolute;left:-9999px;top:0;z-index:999;
  background:var(--brand);color:#fff;padding:10px 16px;border-radius:0 0 var(--r-sm) 0;
}
.skip-link:focus{left:0}

.container{width:100%;max-width:var(--maxw);margin:0 auto;padding:0 20px}
.container.narrow{max-width:920px}

/* ---------- top compliance bar ---------- */
.topbar{
  background:#0f172a;color:#cbd5e1;font-size:12.5px;
}
[data-theme="dark"] .topbar{background:#070c18;color:#94a3b8}
.topbar .container{
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  min-height:36px;padding-top:6px;padding-bottom:6px;
}
.topbar b{color:#fff;font-weight:600}
.topbar .dot{opacity:.4}
.topbar .spacer{flex:1}
.topbar a:hover{color:#fff;text-decoration:underline}

/* ---------- header ---------- */
.site-header{
  position:sticky;top:0;z-index:60;
  background:var(--hdr-bg);
  -webkit-backdrop-filter:saturate(160%) blur(12px);
  backdrop-filter:saturate(160%) blur(12px);
  border-bottom:1px solid var(--line);
}
.site-header .hdr-inner{
  display:flex;align-items:center;gap:16px;
  height:var(--hdr-h);
}
.hdr-search{display:none}
.brand{display:flex;align-items:center;gap:10px;flex:none}
.brand-mark{
  width:36px;height:36px;border-radius:11px;background:var(--grad);
  display:grid;place-items:center;color:#fff;font-weight:800;font-size:18px;
  box-shadow:0 6px 16px rgba(99,102,241,.35);
}
.brand-name{font-weight:800;font-size:18px;letter-spacing:-.03em}
.brand-sub{
  font-size:10px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--faint);font-weight:700;margin-top:-3px;
}

.nav{display:flex;align-items:center;gap:4px}
.nav a{
  padding:8px 12px;border-radius:999px;font-size:14.5px;font-weight:500;color:var(--muted);
}
.nav a:hover{background:var(--surface-2);color:var(--text)}
.nav a.active{background:var(--brand-50);color:var(--brand-700);font-weight:600}

.search{
  flex:1;max-width:340px;position:relative;display:flex;align-items:center;
}
.search input{
  width:100%;height:40px;padding:0 14px 0 38px;
  border:1px solid var(--line);border-radius:999px;background:var(--surface-2);
  outline:none;
}
.search input:focus{border-color:var(--brand);background:var(--surface);box-shadow:0 0 0 3px var(--brand-50)}
.search .si{position:absolute;left:13px;color:var(--faint)}

.hdr-actions{display:flex;align-items:center;gap:8px;flex:none}

.icon-btn{
  width:38px;height:38px;border-radius:11px;border:1px solid var(--line);
  background:var(--surface);display:grid;place-items:center;cursor:pointer;position:relative;
}
.icon-btn:hover{background:var(--surface-2)}
.badge-count{
  position:absolute;top:-5px;right:-5px;min-width:19px;height:19px;padding:0 5px;
  border-radius:999px;background:var(--pink);color:#fff;font-size:11px;font-weight:700;
  display:grid;place-items:center;border:2px solid var(--surface);
}
.dot-unread{
  position:absolute;top:7px;right:8px;width:8px;height:8px;border-radius:50%;
  background:var(--red);border:2px solid var(--surface);
}

.select-mini{
  height:38px;border:1px solid var(--line);background:var(--surface);
  border-radius:11px;padding:0 26px 0 8px;font-size:16px;font-weight:600;cursor:pointer;
}

.avatar-btn{
  display:flex;align-items:center;gap:8px;height:38px;padding:0 10px 0 4px;
  border:1px solid var(--line);background:var(--surface);border-radius:999px;cursor:pointer;
}
.avatar{
  width:30px;height:30px;border-radius:50%;background:var(--grad);color:#fff;
  display:grid;place-items:center;font-size:12.5px;font-weight:700;flex:none;
}
.avatar.lg{width:52px;height:52px;font-size:18px}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  height:42px;padding:0 18px;border-radius:12px;border:1px solid transparent;
  background:var(--surface-2);color:var(--text);font-weight:600;font-size:14.5px;
  cursor:pointer;transition:transform .08s ease,filter .15s ease,background .15s ease;
  white-space:nowrap;
}
.btn:active{transform:translateY(1px)}
.btn:hover{filter:brightness(.97)}
.btn-primary{background:var(--brand);color:#fff;box-shadow:0 8px 20px rgba(79,70,229,.28)}
.btn-grad{background:var(--grad);color:#fff;box-shadow:0 8px 22px rgba(139,92,246,.3)}
.btn-outline{background:var(--surface);border-color:var(--line)}
.btn-ghost{background:transparent;border-color:transparent;color:var(--muted)}
.btn-ghost:hover{background:var(--surface-2)}
.btn-danger{background:var(--red-50);color:var(--red)}
.btn-mint{background:var(--mint);color:#fff}
.btn-lg{height:50px;padding:0 24px;font-size:15.5px;border-radius:14px}
.btn-sm{height:34px;padding:0 12px;font-size:13.5px;border-radius:10px}
.btn-block{width:100%}
.btn:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}
.btn .spin{
  width:16px;height:16px;border-radius:50%;border:2px solid rgba(255,255,255,.4);
  border-top-color:#fff;animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- layout helpers ---------- */
.row{display:flex;align-items:center;gap:10px}
.row.between{justify-content:space-between}
.row.wrap{flex-wrap:wrap}
.col{display:flex;flex-direction:column}
.gap-4{gap:4px}.gap-6{gap:6px}.gap-8{gap:8px}.gap-12{gap:12px}.gap-16{gap:16px}.gap-24{gap:24px}
.mt-4{margin-top:4px}.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}
.mt-24{margin-top:24px}.mt-32{margin-top:32px}.mt-40{margin-top:40px}
.mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}
.hide{display:none !important}
.grow{flex:1}
.center{text-align:center}
.muted{color:var(--muted)}
.faint{color:var(--faint)}
.small{font-size:13px}
.xsmall{font-size:12px}
.b{font-weight:700}
.mono{font-family:"SFMono-Regular",ui-monospace,Menlo,Consolas,monospace}

.grid{display:grid;gap:18px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}

.card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  box-shadow:var(--sh-1);
}
.card-pad{padding:20px}
.sec{padding-top:38px;padding-bottom:8px}
.sec-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px}
.sec-head h2{font-size:26px}
.sec-head p{color:var(--muted);font-size:14.5px;margin-top:4px}

/* ---------- pills / badges ---------- */
.pill{
  display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;
  border-radius:999px;background:var(--surface-2);color:var(--muted);
  font-size:12px;font-weight:600;border:1px solid var(--line-2);
}
.pill.brand{background:var(--brand-50);color:var(--brand-700);border-color:transparent}
.pill.mint{background:var(--mint-50);color:var(--mint);border-color:transparent}
.pill.amber{background:var(--amber-50);color:var(--amber);border-color:transparent}
.pill.red{background:var(--red-50);color:var(--red);border-color:transparent}
.pill.dark{background:#0f172a;color:#fff;border-color:transparent}

/* ---------- product / draw card ---------- */
.draw-card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  overflow:hidden;display:flex;flex-direction:column;cursor:pointer;
  transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;
}
.draw-card:hover{transform:translateY(-3px);box-shadow:var(--sh-2);border-color:rgba(99,102,241,.45)}
/* aspect-ratio fallback for iOS < 15 / older Android WebView */
.dc-media{position:relative;overflow:hidden;background:var(--surface-2);padding-top:100%}
.dc-media img{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:cover}
@supports (aspect-ratio:1/1){
  .dc-media{padding-top:0;aspect-ratio:1/1}
}
.dc-flag{
  position:absolute;top:12px;left:12px;display:flex;gap:6px;flex-wrap:wrap;max-width:calc(100% - 24px);
}
.dc-timer{
  position:absolute;bottom:12px;left:12px;right:12px;
  background:rgba(15,23,42,.72);backdrop-filter:blur(6px);color:#fff;
  border-radius:10px;padding:7px 10px;display:flex;align-items:center;gap:7px;
  font-size:12.5px;font-weight:600;
}
.dc-body{padding:14px 15px 16px;display:flex;flex-direction:column;gap:10px;flex:1}
.dc-title{font-size:14.5px;font-weight:650;line-height:1.35;min-height:39px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dc-price{display:flex;align-items:baseline;gap:8px}
.dc-entry{font-size:19px;font-weight:800;letter-spacing:-.02em}
.dc-retail{font-size:12.5px;color:var(--faint);text-decoration:line-through}
.dc-actions{display:flex;gap:8px;margin-top:2px}

/* progress */
.progress{height:8px;border-radius:999px;background:var(--surface-3);overflow:hidden}
.progress > i{display:block;height:100%;border-radius:999px;background:var(--grad);transition:width .6s cubic-bezier(.2,.8,.2,1)}
.progress.slim{height:6px}

/* ---------- hero ---------- */
.hero{
  position:relative;overflow:hidden;border-radius:var(--r-xl);
  background:var(--grad-soft);border:1px solid var(--line);
  padding:52px 44px;margin-top:22px;
}
.hero:after{
  content:"";position:absolute;right:-120px;top:-120px;width:420px;height:420px;border-radius:50%;
  background:radial-gradient(circle at 30% 30%,rgba(139,92,246,.28),transparent 62%);
}
.hero-inner{position:relative;display:grid;grid-template-columns:1.15fr .85fr;gap:40px;align-items:center}
.hero h1{font-size:46px;letter-spacing:-.035em;line-height:1.06}
.hero h1 em{font-style:normal;background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero p.lead{font-size:17px;color:var(--muted);max-width:52ch;margin-top:16px}
.hero-cta{display:flex;gap:12px;margin-top:26px;flex-wrap:wrap}
.hero-stats{display:flex;gap:30px;margin-top:34px;flex-wrap:wrap}
.hero-stats div b{display:block;font-size:24px;letter-spacing:-.02em}
.hero-stats div span{font-size:12.5px;color:var(--muted)}
.hero-card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  box-shadow:var(--sh-3);padding:18px;
}
.compliance-note{
  margin-top:18px;display:flex;gap:10px;align-items:flex-start;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:12px 14px;font-size:12.5px;color:var(--muted);
}

/* strip of featured */
.strip{display:flex;gap:14px;overflow-x:auto;padding:4px 2px 12px;scroll-snap-type:x mandatory}
.strip > *{scroll-snap-align:start;flex:0 0 232px}
.strip::-webkit-scrollbar{height:8px}
.strip::-webkit-scrollbar-thumb{background:var(--line);border-radius:99px}

/* ---------- steps ---------- */
.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.step{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:20px}
.step .num{
  width:34px;height:34px;border-radius:11px;background:var(--brand-50);color:var(--brand-700);
  display:grid;place-items:center;font-weight:800;margin-bottom:12px;
}
.step h4{font-size:15.5px;margin-bottom:6px}
.step p{color:var(--muted);font-size:13.5px}

.features{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.feature{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:20px}
.feature .fi{
  width:40px;height:40px;border-radius:12px;display:grid;place-items:center;
  background:var(--grad-soft);color:var(--brand-700);margin-bottom:12px;
}
.feature h4{font-size:15.5px;margin-bottom:6px}
.feature p{color:var(--muted);font-size:13.5px}

/* ---------- categories ---------- */
.cats{display:grid;grid-template-columns:repeat(6,1fr);gap:12px}
.cat{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:14px 10px;text-align:center;cursor:pointer;transition:.14s;
}
.cat:hover{border-color:var(--brand);transform:translateY(-2px)}
.cat .ce{font-size:24px}
.cat .cn{font-size:12.5px;font-weight:600;margin-top:6px}

/* ---------- winners ---------- */
.winner-card{
  display:flex;gap:12px;align-items:center;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--r);padding:12px 14px;
}
.winner-card .wav{width:40px;height:40px;border-radius:50%;background:var(--surface-3);display:grid;place-items:center;font-size:18px;flex:none}
.winner-card .wn{font-weight:650;font-size:14px}
.winner-card .wm{font-size:12.5px;color:var(--muted)}

/* ---------- listing ---------- */
.list-layout{display:grid;grid-template-columns:250px 1fr;gap:26px;align-items:start}
.filters{position:sticky;top:calc(var(--hdr-h) + 16px)}
.filter-group{border-bottom:1px solid var(--line-2);padding:14px 0}
.filter-group:first-child{padding-top:0}
.filter-group h5{font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:var(--faint);margin-bottom:10px}
.chk{display:flex;align-items:center;gap:9px;padding:5px 0;cursor:pointer;font-size:14px;color:var(--muted)}
.chk input{width:16px;height:16px;accent-color:var(--brand);cursor:pointer}
.chk:hover{color:var(--text)}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{
  height:34px;padding:0 14px;border-radius:999px;border:1px solid var(--line);
  background:var(--surface);display:inline-flex;align-items:center;gap:6px;
  font-size:13.5px;font-weight:600;cursor:pointer;color:var(--muted);
}
.chip.on{background:var(--brand);border-color:var(--brand);color:#fff}
.range-row{display:flex;align-items:center;gap:8px}
.range-row input{
  width:100%;height:36px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)
}

/* ---------- detail ---------- */
.detail{display:grid;grid-template-columns:1.05fr .95fr;gap:34px;align-items:start}
.gallery-main{
  border-radius:var(--r-lg);overflow:hidden;border:1px solid var(--line);
  background:var(--surface-2);position:relative;padding-top:100%;
}
.gallery-main img{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:cover}
@supports (aspect-ratio:1/1){
  .gallery-main{padding-top:0;aspect-ratio:1/1}
}
.thumbs{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:12px}
.thumb{
  position:relative;border-radius:var(--r-sm);overflow:hidden;border:2px solid transparent;
  cursor:pointer;background:var(--surface-2);padding-top:100%;
}
.thumb img{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:cover}
@supports (aspect-ratio:1/1){
  .thumb{padding-top:0;aspect-ratio:1/1}
}
.thumb.on{border-color:var(--brand)}
.thumb img{width:100%;height:100%;object-fit:cover}

.buy-panel{position:sticky;top:calc(var(--hdr-h) + 16px)}
.price-big{font-size:34px;font-weight:800;letter-spacing:-.03em}
.odds-box{
  margin-top:14px;border:1px dashed var(--line);border-radius:var(--r);
  background:var(--surface-2);padding:12px 14px;font-size:13px;color:var(--muted);
}
.qty{display:flex;align-items:center;gap:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;width:fit-content}
.qty button{width:42px;height:44px;border:0;background:var(--surface);cursor:pointer;font-size:18px;color:var(--muted)}
.qty button:hover{background:var(--surface-2);color:var(--text)}
.qty input{width:64px;height:44px;border:0;text-align:center;font-weight:700;font-size:16px;background:var(--surface);outline:none}
.quick-picks{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.trust-list{display:flex;flex-direction:column;gap:9px;margin-top:16px}
.trust-list div{display:flex;gap:9px;align-items:flex-start;font-size:13.5px;color:var(--muted)}

.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-top:34px;overflow-x:auto}
.tabs button{
  border:0;background:transparent;padding:12px 14px;font-size:14.5px;font-weight:600;
  color:var(--muted);cursor:pointer;border-bottom:2px solid transparent;white-space:nowrap;
}
.tabs button.on{color:var(--brand-700);border-bottom-color:var(--brand)}
.tabpane{padding-top:20px}

.spec-list{display:grid;grid-template-columns:repeat(2,1fr);gap:10px 24px}
.spec-list li{font-size:14px;color:var(--muted)}

.entries-log{max-height:320px;overflow:auto;border:1px solid var(--line);border-radius:var(--r)}
.entries-log .er{display:flex;justify-content:space-between;gap:12px;padding:9px 14px;border-bottom:1px solid var(--line-2);font-size:13.5px}
.entries-log .er:last-child{border-bottom:0}
.entries-log .er.me{background:var(--brand-50)}

/* ---------- cart ---------- */
.cart-layout{display:grid;grid-template-columns:1fr 360px;gap:26px;align-items:start}
.cart-item{display:flex;gap:14px;padding:16px 0;border-bottom:1px solid var(--line-2)}
.cart-item:last-child{border-bottom:0}
.cart-item .thumb-80{width:84px;height:84px;border-radius:var(--r-sm);overflow:hidden;flex:none;background:var(--surface-2)}
.summary-row{display:flex;justify-content:space-between;font-size:14.5px;padding:7px 0}
.summary-row.total{border-top:1px solid var(--line);margin-top:8px;padding-top:14px;font-size:19px;font-weight:800}

/* ---------- forms ---------- */
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.field label{font-size:13px;font-weight:600;color:var(--muted)}
.field input,.field select,.field textarea{
  height:44px;padding:0 13px;border:1px solid var(--line);border-radius:12px;
  background:var(--surface-2);outline:none;width:100%;
}
.field textarea{height:auto;padding:11px 13px;resize:vertical;min-height:96px}
.field input:focus,.field select:focus,.field textarea:focus{
  border-color:var(--brand);background:var(--surface);box-shadow:0 0 0 3px var(--brand-50)
}
.field .err{color:var(--red);font-size:12px}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.checkline{display:flex;gap:10px;align-items:flex-start;font-size:13.5px;color:var(--muted);margin:10px 0}
.checkline input{width:17px;height:17px;margin-top:2px;accent-color:var(--brand);flex:none;cursor:pointer}

.steps-bar{display:flex;align-items:center;gap:10px;margin-bottom:24px}
.steps-bar .sb{display:flex;align-items:center;gap:9px;font-size:14px;color:var(--faint);font-weight:600}
.steps-bar .sb i{
  width:28px;height:28px;border-radius:50%;background:var(--surface-3);color:var(--faint);
  display:grid;place-items:center;font-style:normal;font-size:13px;
}
.steps-bar .sb.on{color:var(--text)}
.steps-bar .sb.on i{background:var(--brand);color:#fff}
.steps-bar .sb.done i{background:var(--mint);color:#fff}
.steps-bar .line{flex:1;height:2px;background:var(--line);max-width:60px}

.pay-methods{display:grid;gap:10px}
.pay-method{
  display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);
  border-radius:var(--r);cursor:pointer;background:var(--surface);
}
.pay-method.on{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-50)}
.pay-method .pm-ico{
  width:42px;height:30px;border-radius:6px;background:var(--surface-3);
  display:grid;place-items:center;font-size:11px;font-weight:800;flex:none;
}

/* ---------- account ---------- */
.acct-layout{display:grid;grid-template-columns:242px 1fr;gap:26px;align-items:start}
.acct-nav{position:sticky;top:calc(var(--hdr-h) + 16px);display:flex;flex-direction:column;gap:3px}
.acct-nav a{
  display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:11px;
  font-size:14.5px;font-weight:550;color:var(--muted);
}
.acct-nav a:hover{background:var(--surface-2);color:var(--text)}
.acct-nav a.on{background:var(--brand-50);color:var(--brand-700);font-weight:650}
.acct-nav .grp{font-size:11px;text-transform:uppercase;letter-spacing:.09em;color:var(--faint);padding:14px 12px 5px;font-weight:700}

.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.stat{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px}
.stat .sk{font-size:12px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.06em}
.stat .sv{font-size:25px;font-weight:800;letter-spacing:-.02em;margin-top:6px}
.stat .sd{font-size:12.5px;color:var(--mint);margin-top:2px}

table.tbl{width:100%;border-collapse:collapse;font-size:14px}
table.tbl th{
  text-align:left;font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:var(--faint);
  padding:10px 12px;border-bottom:1px solid var(--line);font-weight:700;
}
table.tbl td{padding:13px 12px;border-bottom:1px solid var(--line-2);vertical-align:middle}
table.tbl tr:last-child td{border-bottom:0}
table.tbl tbody tr:hover{background:var(--surface-2)}

.entry-numbers{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.entry-num{
  font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;
  background:var(--surface-2);border:1px solid var(--line);border-radius:7px;padding:3px 7px;color:var(--muted);
}
.entry-num.win{background:var(--mint-50);border-color:transparent;color:var(--mint);font-weight:700}

.timeline{display:flex;flex-direction:column;gap:0}
.timeline .tl{display:flex;gap:14px}
.timeline .tl .tl-dot{display:flex;flex-direction:column;align-items:center;flex:none}
.timeline .tl .tl-dot i{width:22px;height:22px;border-radius:50%;background:var(--surface-3);display:grid;place-items:center;color:#fff;font-size:11px}
.timeline .tl.done .tl-dot i{background:var(--mint)}
.timeline .tl .tl-dot span{flex:1;width:2px;background:var(--line);margin:4px 0}
.timeline .tl:last-child .tl-dot span{display:none}
.timeline .tl .tl-body{padding-bottom:18px}
.timeline .tl .tl-body b{font-size:14px}
.timeline .tl .tl-body p{font-size:13px;color:var(--muted)}

.switch{
  width:44px;height:25px;border-radius:999px;background:var(--surface-3);position:relative;
  cursor:pointer;transition:.18s;flex:none;border:0;
}
.switch:after{
  content:"";position:absolute;top:3px;left:3px;width:19px;height:19px;border-radius:50%;
  background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:.18s;
}
.switch.on{background:var(--mint)}
.switch.on:after{transform:translateX(19px)}

/* ---------- live draw ---------- */
.live-wrap{max-width:820px;margin:0 auto;text-align:center}
.live-stage{
  border-radius:var(--r-xl);padding:44px 28px;background:var(--grad-soft);
  border:1px solid var(--line);position:relative;overflow:hidden;
}
.roller{
  height:84px;display:flex;align-items:center;justify-content:center;gap:10px;
  font-family:ui-monospace,Menlo,Consolas,monospace;font-size:44px;font-weight:800;
  letter-spacing:.06em;overflow:hidden;
}
.roller span{display:inline-block;width:1ch;animation:roll .12s linear infinite}
@keyframes roll{0%{transform:translateY(-38%)}100%{transform:translateY(38%)}}
.verify-box{
  text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:14px 16px;margin-top:20px;font-size:12.5px;
}
.verify-box .vr{display:flex;justify-content:space-between;gap:14px;padding:6px 0;border-bottom:1px dashed var(--line-2)}
.verify-box .vr:last-child{border-bottom:0}
.confetti{position:fixed;inset:0;pointer-events:none;z-index:900;overflow:hidden}
.confetti i{position:absolute;top:-24px;font-size:20px;animation:fall linear forwards}
@keyframes fall{to{transform:translateY(105vh) rotate(540deg);opacity:.15}}

/* ---------- FAQ / legal ---------- */
details.faq{border:1px solid var(--line);border-radius:var(--r);background:var(--surface);padding:0;margin-bottom:10px}
details.faq summary{
  cursor:pointer;padding:15px 18px;font-weight:650;font-size:15px;list-style:none;
  display:flex;justify-content:space-between;gap:14px;align-items:center;
}
details.faq summary::-webkit-details-marker{display:none}
details.faq summary:after{content:"+";font-size:20px;color:var(--faint);font-weight:400}
details.faq[open] summary:after{content:"–"}
details.faq .faq-body{padding:0 18px 16px;color:var(--muted);font-size:14px}

.legal-layout{display:grid;grid-template-columns:230px 1fr;gap:26px;align-items:start}
.legal-body h3{margin:26px 0 8px;font-size:17px}
.legal-body p,.legal-body li{color:var(--muted);font-size:14.2px;margin-bottom:8px}
.legal-body h3:first-child{margin-top:0}

/* ---------- footer ---------- */
.site-footer{border-top:1px solid var(--line);margin-top:56px;background:var(--surface);padding:44px 0 30px}
.foot-grid{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr 1fr;gap:26px}
.foot-grid h5{font-size:12.5px;text-transform:uppercase;letter-spacing:.08em;color:var(--faint);margin-bottom:12px}
.foot-grid a{display:block;font-size:14px;color:var(--muted);padding:4px 0}
.foot-grid a:hover{color:var(--text)}
.foot-bottom{
  border-top:1px solid var(--line);margin-top:30px;padding-top:20px;
  display:flex;justify-content:space-between;gap:18px;flex-wrap:wrap;
  font-size:12.5px;color:var(--faint);
}
.legal-strip{
  margin-top:18px;font-size:12px;color:var(--faint);line-height:1.6;
  background:var(--surface-2);border-radius:var(--r);padding:14px 16px;
}

/* ---------- tabbar (mobile) ---------- */
.tabbar{display:none}

/* ---------- modal ---------- */
.modal-mask{
  position:fixed;inset:0;background:rgba(15,23,42,.55);
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
  z-index:200;display:flex;align-items:center;justify-content:center;padding:20px;
  animation:fade .16s ease;overscroll-behavior:contain;
}
@keyframes fade{from{opacity:0}to{opacity:1}}
.modal{
  background:var(--surface);border-radius:var(--r-xl);box-shadow:var(--sh-3);
  width:100%;max-width:480px;max-height:90vh;overflow:auto;animation:pop .2s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop{from{transform:translateY(14px) scale(.97);opacity:0}to{transform:none;opacity:1}}
.modal.wide{max-width:640px}
.modal-head{padding:20px 22px 10px;display:flex;justify-content:space-between;align-items:flex-start;gap:14px}
.modal-head h3{font-size:20px}
.modal-body{padding:0 22px 6px}
.modal-foot{padding:14px 22px 22px;display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
.x-btn{border:0;background:var(--surface-2);width:32px;height:32px;border-radius:9px;cursor:pointer;display:grid;place-items:center;color:var(--muted);flex:none}

/* ---------- toast ---------- */
.toast-root{position:fixed;right:18px;bottom:18px;z-index:800;display:flex;flex-direction:column;gap:10px;align-items:flex-end}
.toast{
  background:#0f172a;color:#fff;border-radius:12px;padding:12px 16px;font-size:14px;
  box-shadow:var(--sh-3);display:flex;gap:10px;align-items:center;max-width:360px;
  animation:slideIn .22s cubic-bezier(.2,.9,.3,1.2);
}
[data-theme="dark"] .toast{background:#e8eefb;color:#0f172a}
@keyframes slideIn{from{transform:translateX(24px);opacity:0}to{transform:none;opacity:1}}
.toast.ok{background:var(--mint);color:#fff}
.toast.err{background:var(--red);color:#fff}

/* ---------- cookie ---------- */
.cookie{
  position:fixed;left:16px;bottom:16px;z-index:300;max-width:400px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  box-shadow:var(--sh-3);padding:18px;
}
.cookie h5{font-size:15px;margin-bottom:6px}
.cookie p{font-size:13px;color:var(--muted);margin-bottom:14px}

/* ---------- misc ---------- */
.countdown{
  display:inline-flex;gap:4px;align-items:center;font-variant-numeric:tabular-nums;
  font-weight:700;letter-spacing:.02em;
}
.empty{
  text-align:center;padding:60px 20px;color:var(--muted);
  border:1px dashed var(--line);border-radius:var(--r-lg);background:var(--surface);
}
.empty .ee{font-size:40px;margin-bottom:10px}
.breadcrumb{display:flex;gap:8px;align-items:center;font-size:13px;color:var(--faint);margin:18px 0 10px}
.breadcrumb a:hover{color:var(--text)}
.divider{height:1px;background:var(--line);margin:22px 0}
.kv{display:flex;justify-content:space-between;gap:14px;padding:8px 0;border-bottom:1px solid var(--line-2);font-size:14px}
.kv:last-child{border-bottom:0}
.kv b{font-weight:650}

.notice{
  display:flex;gap:11px;align-items:flex-start;padding:13px 15px;border-radius:var(--r);
  background:var(--brand-50);color:var(--brand-700);font-size:13.5px;border:1px solid transparent;
}
.notice.mint{background:var(--mint-50);color:var(--mint)}
.notice.amber{background:var(--amber-50);color:var(--amber)}
.notice.red{background:var(--red-50);color:var(--red)}

.marquee{overflow:hidden;position:relative;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);
  mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent)}
.marquee .track{display:flex;gap:14px;width:max-content;animation:slide 34s linear infinite}
.marquee:hover .track{animation-play-state:paused}
@keyframes slide{from{transform:translateX(0)}to{transform:translateX(-50%)}}

/* ---------- responsive ---------- */
@media (max-width:1100px){
  .features{grid-template-columns:repeat(2,1fr)}
  .cats{grid-template-columns:repeat(4,1fr)}
  .steps{grid-template-columns:repeat(2,1fr)}
  .hero-inner{grid-template-columns:1fr;gap:28px}
  .hero h1{font-size:38px}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .foot-grid{grid-template-columns:1fr 1fr 1fr}
  .detail{grid-template-columns:1fr;gap:24px}
  .buy-panel{position:static}
}
@media (max-width:960px){
  .list-layout{grid-template-columns:1fr}
  .filters{position:static;order:2}
  .cart-layout{grid-template-columns:1fr}
  .acct-layout{grid-template-columns:1fr}
  .acct-nav{
    position:static;flex-direction:row;overflow-x:auto;gap:6px;
    border-bottom:1px solid var(--line);padding-bottom:8px;
  }
  .acct-nav .grp{display:none}
  .acct-nav a{white-space:nowrap}
  .legal-layout{grid-template-columns:1fr}
  .nav,.search,.hide-m{display:none}
  .tabbar{
    display:flex;position:fixed;left:0;right:0;bottom:0;z-index:70;
    background:var(--tab-bg);
    -webkit-backdrop-filter:blur(12px);
    backdrop-filter:blur(12px);border-top:1px solid var(--line);
    padding:6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a{
    flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;
    padding:6px 2px;font-size:10.5px;font-weight:600;color:var(--faint);position:relative;
  }
  .tabbar a.on{color:var(--brand-700)}
  body{padding-bottom:66px}
  .toast-root{right:12px;left:12px;bottom:78px;align-items:stretch}
  .modal-mask{align-items:flex-end;padding:0}
  .modal{max-width:none;border-radius:var(--r-xl) var(--r-xl) 0 0;max-height:92vh}
}
@media (max-width:640px){
  .container{padding:0 14px}
  .hero{padding:34px 20px;border-radius:var(--r-lg);margin-top:14px}
  .hero h1{font-size:30px}
  .hero p.lead{font-size:15.5px}
  .hero-stats{gap:20px}
  .grid-3,.grid-4,.grid-2{grid-template-columns:1fr}
  .features{grid-template-columns:1fr}
  .steps{grid-template-columns:1fr}
  .cats{grid-template-columns:repeat(3,1fr)}
  .sec-head{flex-direction:column;align-items:flex-start;gap:8px}
  .sec-head h2{font-size:22px}
  .foot-grid{grid-template-columns:1fr 1fr}
  .thumbs{grid-template-columns:repeat(4,1fr)}
  .spec-list{grid-template-columns:1fr}
  .modal-foot{flex-direction:column-reverse}
  .modal-foot .btn{width:100%}
  .cookie{left:10px;right:10px;bottom:72px;max-width:none}
  .roller{font-size:30px;height:64px}
  .stat-grid{grid-template-columns:1fr 1fr}
}

/* =========================================================
   H5 / touch-device compatibility layer
   Loaded last so it overrides the desktop rules above.
   ========================================================= */

/* --- sticky sidebar helper (inline-styles were removed from markup) --- */
.sticky-side{position:sticky;top:calc(var(--hdr-h) + 16px)}

/* --- table must scroll instead of blowing out the viewport --- */
.tbl-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;width:100%}
table.tbl{min-width:520px}

/* --- horizontal scrollers: touch momentum + hidden scrollbars --- */
.strip,.tabs,.acct-nav,.tbl-scroll,.entries-log,.modal{
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.strip::-webkit-scrollbar,.tabs::-webkit-scrollbar,
.acct-nav::-webkit-scrollbar,.tbl-scroll::-webkit-scrollbar{display:none}
.strip::-webkit-scrollbar-thumb,.tbl-scroll::-webkit-scrollbar-thumb{display:none}

/* --- long hashes / seeds must wrap, not stretch the layout --- */
.mono{overflow-wrap:anywhere}
.row > .grow{min-width:0}
.kv b,.vr b,.summary-row b{min-width:0;overflow-wrap:anywhere}

/* --- touch basics: kill tap flash + 300ms delay --- */
a,button,summary,label,input,select,textarea,[data-act],[data-goto]{touch-action:manipulation}
*{-webkit-tap-highlight-color:rgba(79,70,229,.12)}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px}

/* --- form controls: >=16px prevents iOS focus zoom, appearance reset for WebView --- */
input,select,textarea{
  font-size:16px;
  -webkit-appearance:none;
  appearance:none;
  border-radius:12px;
}
.select-mini,.search input,.field input,.field select{text-indent:0}
select{
  padding-right:30px;
  background-repeat:no-repeat;
  background-position:right 9px center;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E");
}
input[type="checkbox"],input[type="radio"]{
  -webkit-appearance:checkbox;appearance:checkbox;
}
::-webkit-input-placeholder{color:var(--faint);opacity:1}
::placeholder{color:var(--faint);opacity:1}

/* --- no sticky :hover states on touch devices --- */
@media (hover:none){
  .draw-card:hover{transform:none;box-shadow:var(--sh-1);border-color:var(--line)}
  .cat:hover{border-color:var(--line);transform:none}
  .btn:hover{filter:none}
  .nav a:hover{background:transparent}
  table.tbl tbody tr:hover{background:transparent}
  .marquee .track{animation-duration:48s}
}

/* ---------- tablet & large phone ---------- */
@media (max-width:960px){
  :root{--hdr-h:56px}
  html{scroll-padding-top:calc(var(--hdr-h) + 12px)}

  /* product grids keep two columns on phones */
  .grid-products{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .strip > *{flex:0 0 62%}
  .thumbs{grid-template-columns:repeat(5,1fr);gap:8px}

  /* side panels stack instead of sticking */
  .sticky-side,.filters,.acct-nav,.buy-panel{position:static}

  .hdr-inner{gap:10px}
  .brand-mark{width:32px;height:32px;font-size:16px;border-radius:10px}
  .brand-name{font-size:16px}
  .brand-sub{font-size:9px}
  .select-mini{height:36px;padding:0 24px 0 6px;font-size:16px}
  .icon-btn{width:36px;height:36px;flex:none}
  .avatar-btn{height:36px;padding:0 8px 0 3px}

  .topbar .container{min-height:30px;font-size:11.5px;gap:10px;padding-top:5px;padding-bottom:5px}

  .hero{padding:34px 22px;border-radius:var(--r-lg);margin-top:14px}
  .hero:after{right:-160px;top:-160px;width:340px;height:340px}
  .hero h1{font-size:32px}
  .hero p.lead{font-size:15.5px;margin-top:12px}
  .hero-cta .btn{flex:1;min-width:150px}
  .hero-stats{gap:22px 26px;margin-top:26px}
  .hero-stats div b{font-size:21px}

  .sec{padding-top:30px}
  .sec-head{margin-bottom:14px}
  .sec-head h2{font-size:22px}

  .draw-card .dc-body{padding:12px 13px 14px;gap:8px}
  .dc-title{font-size:13.5px;min-height:38px}
  .dc-entry{font-size:17px}
  .dc-actions{gap:6px}
  .dc-actions .btn{flex:1;min-height:40px}
  .dc-timer{font-size:12px;padding:6px 9px}

  .odds-box,.trust-list,.step p,.feature p{font-size:13px}
  .steps-bar{font-size:13px;gap:6px}
  .steps-bar .line{max-width:22px}
  .tabs button{padding:11px 12px;font-size:14px}

  .detail{gap:20px}
  .detail .row.between{flex-wrap:wrap;gap:8px}

  /* touch targets */
  .btn{min-height:44px}
  .btn-sm{min-height:38px;height:38px}
  .btn-lg{min-height:48px}
  .field input,.field select,.field textarea{min-height:46px}
  .checkline input[type="checkbox"]{width:20px;height:20px}
  .switch{width:48px;height:27px}
  .switch:after{width:21px;height:21px}
  .switch.on:after{transform:translateX(21px)}

  /* tables */
  .tbl-scroll{margin:0 -2px;border-radius:var(--r-sm)}

  /* modal becomes a bottom sheet */
  .modal-mask{align-items:flex-end;padding:0}
  .modal{
    max-width:none;border-radius:22px 22px 0 0;
    max-height:calc(92 * var(--vh));
    padding-bottom:env(safe-area-inset-bottom);
    -webkit-overflow-scrolling:touch;
  }
  .modal::before{
    content:"";display:block;width:42px;height:4px;border-radius:99px;
    background:var(--line);margin:9px auto -2px;
  }
  .modal-head{padding:12px 18px 8px}
  .modal-head h3{font-size:18px}
  .modal-body{padding:0 18px 4px}
  .modal-foot{padding:12px 18px calc(18px + env(safe-area-inset-bottom));gap:10px}
  .modal-foot .btn{flex:1;min-height:46px}
  .modal-foot .grow{display:none}

  body{padding-bottom:calc(62px + env(safe-area-inset-bottom))}
  .tabbar{min-height:56px}
  .tabbar a{font-size:10px;padding:5px 2px}
  .tabbar a svg{width:22px;height:22px}

  .toast-root{
    left:12px;right:12px;align-items:stretch;
    bottom:calc(70px + env(safe-area-inset-bottom));
  }
  .toast{max-width:none}
  .cookie{
    left:10px;right:10px;max-width:none;
    bottom:calc(68px + env(safe-area-inset-bottom));
  }
  .confetti{z-index:950}
}

/* ---------- mobile header search ---------- */
@media (max-width:960px){
  .search-toggle{display:grid}
  .hdr-search{display:none;padding:0 0 10px}
  .hdr-search.show{display:block}
  .hdr-search .search{display:flex;max-width:none}
  .hdr-search .search input{height:42px}
}

/* ---------- phone ---------- */
@media (max-width:520px){
  .grid-products{gap:10px}
  .quick-picks .chip{flex:1;justify-content:center;min-height:38px}
  .pay-method{padding:12px}
  .pm-ico{width:38px;height:28px}
  .cart-item .thumb-80{width:72px;height:72px}
  .cart-item{flex-wrap:wrap}
  .odds-box{padding:11px 12px}
  .entry-num{font-size:11.5px;padding:3px 6px}
  .spec-list{gap:8px 16px}
  .acct-nav a{padding:9px 11px;font-size:14px}
  .stat .sv{font-size:22px}
  .winner-card{min-width:240px}
  .verify-box{padding:12px}
  .verify-box .vr{flex-wrap:wrap;gap:4px}
  .legal-strip{padding:12px 13px;font-size:11.5px}
  .foot-grid{gap:18px}
}
@media (max-width:400px){
  .grid-products{grid-template-columns:1fr}
  .hero h1{font-size:27px}
  .hero-stats{gap:16px}
  .hero-stats div b{font-size:19px}
  .cats{grid-template-columns:repeat(2,1fr)}
  .strip > *{flex:0 0 78%}
  .detail .btn.btn-lg{width:100%}
  .brand-sub{display:none}
  .select-mini{display:none}
  .icon-btn[data-act="theme"]{display:none}
  .hdr-actions{gap:6px}
}
@media (max-width:360px){
  .container{padding:0 12px}
  .tabbar a{font-size:9.5px}
  .tabbar a svg{width:20px;height:20px}
  .brand-sub{display:none}
  .select-mini{display:none}
  .icon-btn[data-act="theme"]{display:none}
}

/* ---------- landscape phones: keep content reachable ---------- */
@media (max-width:900px) and (orientation:landscape) and (max-height:520px){
  .hero{padding:24px 20px}
  .hero h1{font-size:26px}
  .hero-stats{margin-top:18px}
  .modal{max-height:calc(86 * var(--vh))}
  body{padding-bottom:calc(54px + env(safe-area-inset-bottom))}
  .tabbar a span{display:none}
  .tabbar a{padding:8px 2px}
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  *{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}
  .marquee .track{animation:none}
}
