/* QLX Games storefront - homepage only. Extends the site's dark palette
   (qlx.css :root tokens) with a social-casino layout: hero cards, cover
   tiles, horizontal rails, continue-playing. Loaded from portal/home.html. */

.sf{--sf-card:#1a2a39;--sf-card-hi:#203445;--sf-blue:#2a7fff;--sf-blue-hi:#1f6ae8;--sf-online:#35c759}

/* hero */
.sf-heroes{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:4px 0 22px}
.sf-hero{position:relative;overflow:hidden;border-radius:14px;min-height:150px;padding:20px 22px;
  display:flex;flex-direction:column;justify-content:space-between;color:#fff;text-decoration:none;
  background:linear-gradient(90deg,rgba(13,24,34,.92),rgba(13,24,34,.35) 50%,rgba(13,24,34,0) 80%),url('/static/img/hero/hero-casino.png') right center/cover #0d1822}
.sf-hero.arcade{background:linear-gradient(90deg,rgba(13,24,34,.92),rgba(13,24,34,.35) 50%,rgba(13,24,34,0) 80%),url('/static/img/hero/hero-arcade.png') right center/cover #0d1822}
.sf-hero h2{margin:0;font-size:26px;font-weight:800;letter-spacing:.02em}
.sf-hero .sf-play{display:inline-flex;align-items:center;gap:9px;font-weight:700}
.sf-hero .sf-tri{width:24px;height:24px;border-radius:7px;background:rgba(255,255,255,.18);display:grid;place-items:center}
.sf-hero .sf-count{color:#cfe0f4;font-weight:600;font-size:13px;display:inline-flex;align-items:center;gap:7px;margin-left:14px}
.sf-dot{width:8px;height:8px;border-radius:50%;background:var(--sf-online);display:inline-block}
.sf-hero:hover{text-decoration:none;filter:brightness(1.05)}

/* search */
.sf-search{display:flex;align-items:center;gap:11px;background:var(--sf-card);border-radius:11px;padding:0 15px;height:50px;margin:0 0 8px}
.sf-search input{flex:1;background:none;border:0;outline:none;color:var(--ink);font-size:15px;font-weight:600}
.sf-search input::placeholder{color:var(--muted)}
.sf-search svg{width:20px;height:20px;color:var(--muted)}

/* section heads + rails */
.sf-vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.sf-sec{display:flex;align-items:center;gap:9px;margin:28px 0 13px;font-weight:800;font-size:18px}
.sf-sec a{color:var(--muted);font-size:13px;font-weight:700;margin-left:auto;text-decoration:none}
.sf-sec a:hover{color:var(--ink)}
.sf-rail{display:grid;grid-auto-flow:column;grid-auto-columns:148px;gap:13px;overflow-x:auto;padding-bottom:8px;scroll-snap-type:x proximity}
.sf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:13px}

/* tile */
.sf-tile{scroll-snap-align:start;border-radius:10px;overflow:hidden;background:var(--sf-card);
  text-decoration:none;color:var(--ink);display:block;transition:transform .12s ease,background .12s ease}
.sf-tile:hover{transform:translateY(-4px);background:var(--sf-card-hi);text-decoration:none}
.sf-thumb{position:relative;height:190px;display:flex;align-items:flex-end;padding:11px}
.sf-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.sf-thumb .sf-scrim{position:absolute;inset:0;background:linear-gradient(transparent 44%,rgba(0,0,0,.66))}
.sf-thumb .sf-name{position:relative;z-index:1;font-weight:800;font-size:15px;line-height:1.12;text-shadow:0 2px 10px rgba(0,0,0,.6)}
.sf-badge{position:absolute;top:8px;left:8px;z-index:2;background:rgba(0,0,0,.4);border-radius:7px;
  padding:3px 7px;font-size:10px;font-weight:800;letter-spacing:.03em;text-transform:uppercase}
.sf-fav{position:absolute;top:7px;right:7px;z-index:2;width:28px;height:28px;border-radius:8px;
  background:rgba(0,0,0,.35);display:grid;place-items:center;border:0;cursor:pointer}
.sf-fav svg{width:16px;height:16px;color:#fff;fill:none;stroke:#fff;stroke-width:2}
.sf-fav.on svg{fill:#ffd166;stroke:#ffd166}
.sf-meta{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;color:var(--muted);font-size:12px;font-weight:600}
.sf-meta .sf-ppl{display:inline-flex;align-items:center;gap:6px}

/* balance strip + activity (kept compact under the catalogue) */
.sf-wallet{display:flex;align-items:center;gap:16px;background:var(--sf-card);border-radius:12px;padding:16px 20px;margin:26px 0 0}
.sf-wallet .sf-bal{font-size:26px;font-weight:800}
.sf-wallet .sf-bal small{display:block;font-size:12px;font-weight:600;color:var(--muted);letter-spacing:.02em}

.sf-hide{display:none !important}

@media(max-width:620px){
  .sf-heroes{grid-template-columns:1fr}
  .sf-rail{grid-auto-columns:132px}
}

/* ---- Phase 2: docked side panels (homepage only) ---- */
.wrap:has(.sf-shell){max-width:1580px;padding-top:10px}
.sf-shell{display:grid;grid-template-columns:230px minmax(0,1fr) 330px;gap:18px;align-items:start}
/* Sidebar toggle (top bar) collapses the chat column on desktop. */
.sf-shell.chat-collapsed{grid-template-columns:230px minmax(0,1fr)}
.sf-shell.chat-collapsed .sf-chat{display:none}
.sf-col-main{min-width:0}

/* left: saved games */
.sf-panel{background:var(--sf-card);border-radius:12px;padding:14px}
.sf-panel h3{margin:0 0 12px;font-size:12px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);display:flex;align-items:center;gap:8px}
.sf-panel h3 svg{width:16px;height:16px}
.sf-saved-list{display:flex;flex-direction:column;gap:7px}
.sf-saved-item{display:flex;align-items:center;gap:10px;padding:7px;border-radius:9px;text-decoration:none;color:var(--ink)}
.sf-saved-item:hover{background:var(--sf-card-hi);text-decoration:none}
.sf-saved-thumb{width:42px;height:42px;border-radius:8px;overflow:hidden;flex:0 0 auto;position:relative;background:#22364a}
.sf-saved-thumb img{width:100%;height:100%;object-fit:cover}
.sf-saved-item .nm{display:block;font-weight:700;font-size:13px;line-height:1.15}
.sf-saved-item .ct{display:block;color:var(--muted);font-size:11px}
.sf-empty{color:var(--muted);font-size:13px;line-height:1.5}

/* right: chat */
/* Right chat runs from just under the top bar to the bottom of the viewport,
   like Stake (bar is 64px; 10px breathing room top and bottom). */
.sf-chat{background:var(--sf-card);border-radius:12px;display:flex;flex-direction:column;height:calc(100vh - 84px);position:sticky;top:74px}
.sf-chat h3{margin:0;padding:13px 14px;border-bottom:1px solid var(--line);font-size:12px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);display:flex;align-items:center;gap:8px}
.sf-chat h3 .sf-dot{margin-left:auto}
.sf-chat-msgs{flex:1;overflow-y:auto;padding:12px 14px;display:flex;flex-direction:column;gap:10px}
.sf-msg{font-size:13px;line-height:1.35}
.sf-msg .who{font-weight:800;color:#8fc0ff}
.sf-msg .bd{color:#d4deea;word-break:break-word}
.sf-chat-empty{color:var(--muted);font-size:13px;margin:auto;text-align:center;padding:20px}
.sf-chat-in{border-top:1px solid var(--line);padding:11px;display:flex;gap:8px}
.sf-chat-in input{flex:1;min-width:0;background:var(--bg);border:1px solid var(--line);border-radius:9px;padding:0 12px;height:40px;color:var(--ink);font:inherit;outline:none}
.sf-chat-in button{background:var(--sf-blue);color:#fff;font-weight:700;border-radius:9px;padding:0 15px;border:0;cursor:pointer}
.sf-chat-in button:hover{background:var(--sf-blue-hi)}

@media(max-width:1200px){
  .wrap:has(.sf-shell){max-width:1100px}
  .sf-shell{grid-template-columns:1fr}
  .sf-side,.sf-chat{display:none}
}

/* ---- VIP progress card ---- */
.sf-vip{background:var(--sf-card);border-radius:12px;padding:15px 18px;margin:0 0 4px}
.sf-vip-head{display:flex;align-items:center;gap:8px;font-weight:800;font-size:15px;margin-bottom:12px}
.sf-vip-head svg{width:18px;height:18px;color:#e8b949}
.sf-vip-row{display:flex;justify-content:space-between;align-items:center;font-weight:700;margin-bottom:8px}
.sf-vip-row .pct{color:var(--muted)}
.sf-vip-bar{height:7px;border-radius:5px;background:var(--bg);overflow:hidden}
.sf-vip-bar>i{display:block;height:100%;background:linear-gradient(90deg,#2a7fff,#59a6ff);border-radius:5px}
.sf-vip-foot{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;font-weight:600;margin-top:9px}

/* ---- support help widget ---- */
.sf-help-fab{position:fixed;left:18px;bottom:18px;z-index:60;width:52px;height:52px;border-radius:50%;
  background:var(--sf-blue);color:#fff;border:0;cursor:pointer;display:grid;place-items:center;box-shadow:0 6px 20px rgba(0,0,0,.45)}
.sf-help-fab svg{width:24px;height:24px}
.sf-help-fab:hover{background:var(--sf-blue-hi)}
.sf-help{position:fixed;left:18px;bottom:82px;z-index:60;width:340px;max-width:calc(100vw - 32px);
  background:var(--sf-card);border:1px solid var(--line);border-radius:14px;overflow:hidden;
  box-shadow:0 12px 40px rgba(0,0,0,.5);display:flex;flex-direction:column;max-height:72vh}
.sf-help-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;
  background:linear-gradient(120deg,#184a84,#2f74cf);color:#fff;font-size:16px;font-weight:700}
.sf-help-head button{background:none;border:0;color:#fff;font-size:22px;line-height:1;cursor:pointer}
.sf-help-body{padding:10px 14px;overflow-y:auto}
.sf-faq details{border-bottom:1px solid var(--line);padding:4px 0}
.sf-faq summary{cursor:pointer;font-weight:700;font-size:14px;padding:7px 0;list-style:none}
.sf-faq summary::-webkit-details-marker{display:none}
.sf-faq summary::after{content:'+';float:right;color:var(--muted)}
.sf-faq details[open] summary::after{content:'\2013'}
.sf-faq p{margin:2px 0 8px;color:var(--muted);font-size:13px;line-height:1.5}
.sf-help-msg{display:flex;gap:8px;padding:12px 14px;border-top:1px solid var(--line)}
.sf-help-msg textarea{flex:1;resize:none;background:var(--bg);border:1px solid var(--line);border-radius:9px;padding:8px 10px;color:var(--ink);font:inherit;outline:none}
.sf-help-msg button{background:var(--sf-blue);color:#fff;font-weight:700;border:0;border-radius:9px;padding:0 15px;cursor:pointer}
.sf-help-sent{padding:12px 14px;color:#35c759;font-size:13px;font-weight:600}

/* hidden must beat the panel/form display rules (close button, sent state) */
.sf-help[hidden],.sf-help-msg[hidden],.sf-help-sent[hidden]{display:none !important}

/* ---- chat FAB + mobile chat overlay (chat is docked on desktop) ---- */
.sf-chat-fab{position:fixed;right:18px;bottom:18px;z-index:60;width:52px;height:52px;border-radius:50%;background:var(--sf-blue);color:#fff;border:0;cursor:pointer;display:none;place-items:center;box-shadow:0 6px 20px rgba(0,0,0,.45)}
body.cv-locked .sf-chat-fab,body.cv-locked .sf-help-fab{display:none!important}/* a full-screen run: they sat over the game's controls */
.sf-chat-fab:hover{background:var(--sf-blue-hi)}
.sf-chat-fab svg{width:24px;height:24px}
.sf-chat-close{display:none;background:none;border:0;color:var(--muted);font-size:20px;line-height:1;cursor:pointer;margin-left:8px}
@media(max-width:1200px){
  .sf-chat-fab{display:grid}
  .sf-chat.sf-open{display:flex;position:fixed;top:60px;right:8px;bottom:8px;left:auto;width:min(380px,92vw);height:auto;z-index:70}
  .sf-chat-close{display:block}
  /* Burger opens the left rail as a slide-in panel on narrow screens. */
  .sf-side.sf-open{display:flex;position:fixed;top:60px;left:8px;bottom:8px;width:min(300px,86vw);height:auto;overflow:auto;z-index:70;background:var(--sf-card);border-radius:12px;padding:12px}
}

/* ---- support Q&A thread ---- */
.sf-help-thread{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.sf-help-b{padding:8px 11px;border-radius:10px;font-size:13px;line-height:1.45;max-width:88%;word-break:break-word}
.sf-help-b.q{align-self:flex-end;background:var(--sf-blue);color:#fff;border-bottom-right-radius:3px}
.sf-help-b.a{align-self:flex-start;background:var(--bg);color:#d4deea;border-bottom-left-radius:3px}

/* ---- left nav rail ---- */
.sf-side{display:flex;flex-direction:column;gap:14px;position:sticky;top:74px;align-self:start}
.sf-nav{background:var(--sf-card);border-radius:12px;padding:8px}
.sf-nav-i{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:9px;color:var(--muted);font-weight:700;font-size:14px;text-decoration:none}
.sf-nav-i svg{width:20px;height:20px;flex:0 0 auto;color:var(--muted)}
.sf-nav-i:hover{background:var(--sf-card-hi);color:var(--ink);text-decoration:none}
.sf-nav-i.active{background:var(--sf-card-hi);color:var(--ink)}
.sf-nav-i.active svg,.sf-nav-i:hover svg{color:var(--sf-blue)}
.sf-nav-g{color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:14px 12px 7px}

/* Header is the Stake-style toolbar from qlx.css (.tb-* classes); no overrides
   here so there is a single source of truth for the bar. */

/* The base .sf-side{display:flex} above is defined after the mobile @media
   hide, so on phones it won overridden and the left rail rendered inline over
   the heroes. Re-hide it on mobile (higher specificity + later in source);
   the burger still opens it via .sf-side.sf-open. */
@media(max-width:1200px){ .sf-side:not(.sf-open){ display:none; } }

/* ---- inner storefront pages (All Games, a category, Leaderboard) ----
   Same shell as the lobby; these are the main-column pieces those pages add.
   The middle grid column must be able to shrink so wide tables/rails scroll
   inside it instead of blowing out the grid. */
.sf-main{min-width:0}
.sf-head{display:flex;align-items:center;gap:14px;margin:4px 0 6px}
.sf-h1{margin:0;font-size:24px;font-weight:800}
.sf-bal-pill{margin-left:auto;background:var(--sf-card);border-radius:11px;padding:8px 14px;font-size:18px;font-weight:800;line-height:1}
.sf-bal-pill small{display:block;font-size:11px;font-weight:600;color:var(--muted);letter-spacing:.02em;margin-top:2px}
.sf-sub{color:var(--muted);font-size:13px;line-height:1.5;margin:0 0 14px}
.sf-crumbs{color:var(--muted);font-size:12px;font-weight:600;margin:0 0 6px}
.sf-crumbs a{color:var(--muted);text-decoration:none}
.sf-crumbs a:hover{color:var(--ink)}

/* All Games: categories as storefront cards */
.sf-catgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:13px;margin-top:4px}
.sf-cat{position:relative;display:flex;flex-direction:column;justify-content:flex-end;gap:5px;
  min-height:168px;border-radius:12px;padding:16px;overflow:hidden;text-decoration:none;color:#fff;
  background:var(--sf-card) center/cover no-repeat;transition:transform .12s ease}
.sf-cat::before{content:"";position:absolute;inset:0;z-index:0;
  background:linear-gradient(180deg,rgba(13,24,34,.12) 0%,rgba(13,24,34,.55) 55%,rgba(13,24,34,.9) 100%)}
.sf-cat > *{position:relative;z-index:1}
.sf-cat:hover{transform:translateY(-4px);text-decoration:none}
.sf-cat-name{font-size:19px;font-weight:800;color:#fff;text-shadow:0 1px 5px rgba(0,0,0,.65)}
.sf-cat-blurb{color:#dde7f2;font-size:13px;line-height:1.35;text-shadow:0 1px 3px rgba(0,0,0,.5)}
.sf-cat-count{color:#9fd0ff;font-size:12px;font-weight:700;margin-top:4px}

/* Category: coming-soon entries under the playable grid */
.sf-soongrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:13px}
.sf-soon{display:flex;flex-direction:column;gap:5px;background:var(--sf-card);border-radius:12px;padding:15px;
  text-decoration:none;color:var(--ink);opacity:.72}
a.sf-soon:hover{opacity:1;background:var(--sf-card-hi);text-decoration:none}
.sf-soon-name{font-weight:800;font-size:15px;display:flex;align-items:center;gap:8px}
.sf-soon-desc{color:var(--muted);font-size:12px;line-height:1.4}
.sf-soon-prev{color:var(--sf-blue);font-size:12px;font-weight:700}

/* ---- Leaderboard: dark Stake-style boards ---- */
.sf-lb-window{color:var(--muted);font-size:13px;font-weight:600;margin:0 0 16px}
.sf-lb-window a{color:var(--sf-blue);text-decoration:none}
.sf-lb-window a:hover{text-decoration:underline}
.sf-lb-window strong{color:var(--ink)}
.sf-lb-you{background:var(--sf-card);border-radius:12px;padding:16px 18px;margin:0 0 16px}
.sf-lb-you h3{margin:0 0 12px;font-size:13px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.sf-lb-stats{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}
.sf-lb-stats li{display:flex;flex-direction:column;gap:3px}
.sf-lb-stats span{color:var(--muted);font-size:12px;font-weight:600}
.sf-lb-stats strong{font-size:19px;font-weight:800}
.sf-lb-panel{background:var(--sf-card);border-radius:12px;padding:16px 18px;margin:0 0 16px}
.sf-lb-panel h3{margin:0 0 6px;font-size:16px;font-weight:800}
.sf-lb-panel .sf-sub{margin:0 0 12px}
.sf-lb-scroll{overflow-x:auto}
.sf-lb{width:100%;border-collapse:collapse;font-size:13px;min-width:420px}
.sf-lb thead th{text-align:left;color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.05em;
  text-transform:uppercase;padding:0 12px 10px;border-bottom:1px solid var(--line)}
.sf-lb tbody td{padding:11px 12px;border-bottom:1px solid var(--line);color:#d4deea;white-space:nowrap}
.sf-lb tbody tr:last-child td{border-bottom:0}
.sf-lb tbody tr:hover td{background:var(--sf-card-hi)}
.sf-lb td a{color:#8fc0ff;text-decoration:none}
.sf-lb td a:hover{text-decoration:underline}
.sf-lb .num{text-align:right;font-variant-numeric:tabular-nums}
.sf-lb .rank{color:var(--muted);font-weight:800;width:1%}
.sf-lb .strong{font-weight:800;color:var(--ink)}
.sf-lb-notes{background:var(--sf-card);border-radius:12px;padding:14px 18px;color:var(--muted);font-size:13px}
.sf-lb-notes summary{cursor:pointer;font-weight:700;color:var(--ink)}
.sf-lb-notes ul{margin:12px 0 0;padding-left:18px;line-height:1.6}
.sf-lb-notes strong{color:var(--ink)}

/* ---- chat avatars, online count, profile popup ---- */
.sf-av{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;
  color:#fff;font-size:10px;font-weight:800;flex:0 0 auto;margin-right:6px;vertical-align:middle}
.sf-msg{line-height:1.5}
.sf-msg .who{cursor:pointer}
.sf-msg .who:hover{text-decoration:underline}
.sf-colon{color:#8fc0ff;font-weight:800}
.sf-chat-online{display:flex;align-items:center;gap:7px;padding:8px 14px;font-size:12px;color:var(--muted);border-top:1px solid var(--line)}
.sf-online-dot{width:8px;height:8px;border-radius:50%;background:#35c759;box-shadow:0 0 6px #35c759;flex:0 0 auto}
.sf-chat-online b{color:var(--ink);font-weight:800}
.sf-profile{position:absolute;left:12px;right:12px;bottom:92px;z-index:40;background:#13212e;border:1px solid #22384d;
  border-radius:12px;padding:14px 16px;box-shadow:0 18px 44px rgba(0,0,0,.55)}
.sf-profile-x{position:absolute;top:6px;right:10px;background:none;border:0;color:var(--muted);font-size:20px;line-height:1;cursor:pointer}
.sf-profile-top{display:flex;align-items:center;gap:12px}
.sf-av-lg{width:40px;height:40px;font-size:16px;margin:0}
.sf-profile-name{font-weight:800;font-size:15px;color:var(--ink)}
.sf-profile-sub{color:var(--muted);font-size:12px}
.sf-profile-vip{margin:12px 0 4px;color:#ffcf5a;font-weight:700;font-size:13px}
.sf-profile-stats{color:var(--muted);font-size:12px}
.sf-profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0 2px}
.sf-stat{background:var(--sf-card-hi);border-radius:8px;padding:7px 9px;display:flex;flex-direction:column;gap:2px}
.sf-stat span{color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.04em}
.sf-stat b{color:var(--ink);font-size:14px;font-weight:800}
.sf-profile-fav{color:var(--muted);font-size:12px;margin:2px 0 4px}
.sf-profile-load{color:var(--muted);font-size:13px;padding:6px 0}
.sf-profile-ignore{margin-top:12px;width:100%;background:#1d3042;border:1px solid #2a4258;color:#cdd8e4;
  border-radius:9px;padding:8px;font-weight:700;cursor:pointer}
.sf-profile-ignore:hover{background:#243b50}

/* ---- Biggest Wins feed (home) ---- */
.sf-winfeed{background:var(--sf-card);border-radius:12px;overflow:hidden;margin-top:2px}
.sf-win-head,.sf-win-row{display:grid;grid-template-columns:1.5fr 1fr .7fr 1fr;gap:10px;padding:10px 16px;align-items:center}
.sf-win-head{color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;border-bottom:1px solid var(--line)}
.sf-win-row{font-size:13px;border-bottom:1px solid var(--line);color:#d4deea}
.sf-win-row:last-child{border-bottom:0}
.sf-win-row .wn{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sf-win-row .wu{color:#8fc0ff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sf-win-row .wm{color:#35c759;font-weight:700;font-variant-numeric:tabular-nums}
.sf-win-row .wp{text-align:right;font-weight:700;font-variant-numeric:tabular-nums;display:flex;align-items:center;justify-content:flex-end;gap:5px}
.sf-win-row .wc{width:14px;height:14px;flex:0 0 auto}
.sf-win-new{animation:sfWinIn .5s ease}
@keyframes sfWinIn{from{background:rgba(42,127,255,.14)}to{background:transparent}}

/* ---- game-play view: the game inside the storefront shell ---- */
.wrap-gameshell{max-width:1580px;padding-top:10px}
.sf-shell-game{grid-template-columns:230px minmax(0,1fr) 330px}
.sf-gameframe{background:#0b1620;border:1px solid var(--line);border-radius:14px;
  min-height:62vh;display:flex;flex-direction:column;padding:16px;position:relative}
/* QLX pre-game splash: a branded loader over the game pane while a pre-roll ad
   runs (or for a short beat if there is no ad), then it fades to reveal play. */
.qlx-splash{position:absolute;inset:0;z-index:40;display:flex;align-items:center;justify-content:center;
  background:radial-gradient(120% 90% at 50% 40%,#12283a,#0b1620 70%);border-radius:14px;transition:opacity .5s ease}
.qlx-splash-out{opacity:0;pointer-events:none}
.qlx-splash-logo{width:min(44%,300px);height:auto;filter:drop-shadow(0 6px 24px rgba(0,0,0,.55));
  animation:qlxSplashPulse 1.5s ease-in-out infinite}
.qlx-splash-bar{position:absolute;bottom:34px;left:50%;transform:translateX(-50%);width:min(40%,220px);height:3px;
  border-radius:3px;background:rgba(255,255,255,.12);overflow:hidden}
.qlx-splash-bar::after{content:"";position:absolute;inset:0;width:40%;border-radius:3px;background:var(--sf-blue,#2a7fff);
  animation:qlxSplashBar 1.1s ease-in-out infinite}
@keyframes qlxSplashPulse{0%{opacity:.45;transform:scale(.95)}50%{opacity:1;transform:scale(1)}100%{opacity:.45;transform:scale(.95)}}
@keyframes qlxSplashBar{0%{left:-40%}100%{left:100%}}
@media(prefers-reduced-motion:reduce){.qlx-splash-logo,.qlx-splash-bar::after{animation:none}}
/* strip the game's own outer card chrome; keep its natural size, centred */
.sf-gameframe > .card,.sf-gameframe > section.card{background:transparent;border:0;margin:0 auto;
  border-radius:0;box-shadow:none;padding:0;width:100%}
@media(max-width:1200px){
  .sf-shell-game{grid-template-columns:1fr}
  .sf-shell-game .sf-side,.sf-shell-game .sf-chat{display:none}
  /* the chat button still opens the chat over a game (it used to stay hidden: the rule above won) */
  .sf-shell-game .sf-chat.sf-open{display:flex}
}

/* All Games: category tiles use the hero banner look (image + Play Now) */
.sf-herogrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:16px;margin-top:4px}
.sf-cathero h2{font-size:24px}
.sf-cathero .sf-count{margin-left:0}
@media(max-width:620px){ .sf-herogrid{grid-template-columns:1fr} }

/* All Games hero tiles: strong dark-left so the title + Play Now button read
   clearly (like the CASINO/ARCADE heroes), image only on the right. */
.sf-cathero{background:linear-gradient(90deg,rgba(13,24,34,.97),rgba(13,24,34,.82) 38%,rgba(13,24,34,.4) 64%,rgba(13,24,34,.05) 94%),var(--cat-img) right center/cover #0d1822 !important;min-height:150px}

/* --- public (signed-out) pages: intro, game info, prose, guest panel --- */
.sf-intro{background:var(--sf-card);border-radius:14px;padding:18px 20px;margin:14px 0 6px}
.sf-intro h1{margin:0 0 6px;font-size:24px;font-weight:800}
.sf-intro p{margin:0 0 10px;color:var(--muted);font-size:14px;line-height:1.55}
.sf-intro a{color:var(--ink)}
.sf-intro-cta{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.sf-intro-cta .btn{margin:0}
.sf-intro-link{margin-left:auto;font-weight:700;font-size:13px}
.sf-faq{background:var(--sf-card);border-radius:14px;padding:18px 20px;margin:26px 0 10px}
.sf-faq h2{margin:0 0 10px;font-size:18px;font-weight:800}
.sf-faq dt{font-weight:700;margin:12px 0 3px}
.sf-faq dd{margin:0;color:var(--muted);font-size:14px;line-height:1.55}
.sf-faq a{color:var(--ink)}
.sf-info{display:grid;grid-template-columns:minmax(200px,320px) 1fr;gap:22px;align-items:start;margin:6px 0 18px}
.sf-info-cover{border-radius:14px;overflow:hidden;background:var(--sf-card);aspect-ratio:4/5}
.sf-info-cover img{width:100%;height:100%;object-fit:cover;display:block}
.sf-info-meta{color:var(--muted);font-size:13px;margin:2px 0 10px}
.sf-info-desc{font-size:16px;line-height:1.55;margin:0 0 14px}
.sf-info-cta{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 10px}
.sf-info-cta .btn{margin:0}
.sf-howto{margin:0;padding-left:22px;font-size:14px;line-height:1.6}
.sf-howto li{margin:0 0 6px}
.sf-prose{max-width:760px;font-size:15px;line-height:1.6}
.sf-prose h2{font-size:17px;font-weight:800;margin:22px 0 6px}
.sf-prose h2 span{color:var(--muted);font-weight:600;margin-left:8px;font-size:14px}
.sf-prose p,.sf-prose li{color:var(--muted)}
.sf-prose a{color:var(--ink)}
.sf-prose ul{padding-left:20px}
.sf-changelog li{margin:0 0 4px}
.sf-guest-panel .btn{display:block;text-align:center;margin:10px 0 0}
.sf-guest-panel h3{margin:0 0 6px;font-size:14px;font-weight:800}
@media (max-width:720px){.sf-info{grid-template-columns:1fr}.sf-info-cover{max-width:280px}.sf-intro-link{margin-left:0}}
