/* Reference lobby: presentation only; game frames retain their own layout rules. */
body[data-lobby-layout="reference"] {
  --lobby-header-height:76px;
  --lobby-width:1180px;
  --lobby-gutter:28px;
  background:var(--paper);
  color:var(--ink);
}
:root:not([data-theme]) body[data-lobby-layout="reference"],
:root[data-theme="dark"] body[data-lobby-layout="reference"] {
  --paper:#101126;
  --surface:#171b39;
  --raised:#202549;
  --ink:#edf0ff;
  --muted:#929abd;
  --accent:#716bff;
  --lavender:#afaaff;
  --line:#292d4c;
  --neon:#3939ff;
  --theme-on-accent:#fff;
  --theme-field:#12162e;
}
body[data-lobby-layout="reference"] > .site-backdrop { display:none; }
body[data-lobby-layout="reference"] #games-hub { scroll-margin-block-start:calc(var(--lobby-header-height) + var(--ncb-tg-inset-top,0px) + 12px); }

/* One compact header remains visible while browsing and inside every game. */
body[data-game-ui="compact"][data-lobby-layout="reference"] .site-header.game-header:has(#header-settings) {
  position:sticky;
  top:0;
  z-index:35;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto auto;
  grid-template-rows:auto;
  align-items:center;
  width:100%;
  max-width:none;
  min-height:76px;
  margin:0;
  padding:12px max(var(--lobby-gutter),calc((100% - var(--lobby-width))/2));
  gap:12px;
  border-bottom:1px solid var(--line);
  background:color-mix(in srgb,var(--paper) 96%,transparent);
  backdrop-filter:blur(18px);
  box-shadow:none;
}
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .header-left {
  display:flex; grid-column:1; grid-row:1; align-items:flex-start; flex-direction:row; min-width:0;
}
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .brand {
  grid-column:auto; grid-row:auto; align-self:center; gap:9px; max-width:100%; color:var(--ink); font-size:21px; letter-spacing:-.8px;
}
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .brand-logo {
  width:42px; height:42px; border-radius:0; object-fit:contain;
}
html[data-theme="light"] body[data-lobby-layout="reference"] .game-header .brand-logo { filter:brightness(0) saturate(100%) opacity(.85); }
body[data-lobby-layout="reference"] .lobby-brand-wordmark { display:flex; flex-direction:column; font-size:19px; font-weight:900; line-height:.85; letter-spacing:-.5px; }
body[data-lobby-layout="reference"] .lobby-brand-wordmark > span { font-size:15px; letter-spacing:.4px; }
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) > .header-profile {
  grid-column:2; grid-row:1; justify-self:end; display:flex; align-items:center; justify-content:center; flex:none;
  width:auto; min-width:156px; max-width:250px; min-height:48px; margin:0; padding:6px 12px; gap:10px;
  border:1px solid var(--line); border-radius:11px; background:var(--theme-field,var(--surface)); color:var(--ink); box-shadow:none;
}
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .header-profile :is(.header-profile-meta,.header-usd-note) {
  position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
body[data-lobby-layout="reference"] .lobby-balance-profile { display:flex; flex:none; flex-direction:column; align-items:center; justify-content:center; width:28px; gap:2px; color:var(--ink); }
body[data-lobby-layout="reference"] .lobby-balance-profile svg { width:21px; height:21px; }
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .lobby-balance-profile .header-profile-avatar { display:block; position:static; flex:none; width:auto; min-width:0; height:auto; margin:0; padding:0; border:0; border-radius:0; background:none; color:inherit; font:700 10px/1.1 var(--body); letter-spacing:.2px; white-space:nowrap; }
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .header-profile .header-usd-balance {
  display:flex; flex-direction:row; align-items:center; justify-content:center; flex:1; width:auto; min-width:0; max-width:100%; min-height:0; margin:0; padding:0; gap:8px; border:0; border-radius:0; background:none; box-shadow:none;
}
body[data-lobby-layout="reference"] .header-profile .header-usd-label { order:2; margin:0; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.3px; }
body[data-lobby-layout="reference"] .lobby-currency-badge { display:grid; place-items:center; flex:none; order:1; width:22px; height:22px; border-radius:50%; background:#36c38a; color:#102b25; font-size:14px; font-weight:900; }
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .header-profile .header-usd-total {
  flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; overflow-wrap:normal;
}
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .header-profile .header-usd-total:not(.is-unavailable) {
  min-width:0; margin:0; overflow:hidden; text-overflow:ellipsis; color:var(--ink); font-size:16px; line-height:1.2; font-weight:750; font-variant-numeric:tabular-nums;
}
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .header-profile .header-usd-total.is-unavailable { max-width:120px; font-size:11px; line-height:1.2; }
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .header-wallet {
  grid-column:3; grid-row:1; display:flex; align-self:center; margin:0; min-width:0;
}
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .header-wallet-actions { display:flex; width:auto; gap:0; grid-column:auto; grid-row:auto; }
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .header-wallet-actions > .header-deposit {
  display:inline-flex; align-items:center; justify-content:center; flex:none; width:auto; min-width:44px; min-height:44px; padding:11px 16px; gap:8px; border:0; border-radius:10px; background:var(--neon,var(--accent)); color:var(--theme-on-accent,#fff); font-size:13px; font-weight:750; box-shadow:none;
}
body[data-lobby-layout="reference"] .header-deposit svg { width:20px; height:20px; flex:none; }
body[data-lobby-layout="reference"] .lobby-profile-shortcut {
  grid-column:3; grid-row:1; display:grid; place-items:center; width:40px; height:44px; border:0; border-radius:10px; color:var(--ink); background:transparent;
}
body[data-lobby-layout="reference"] .lobby-profile-shortcut svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; }
body[data-lobby-layout="reference"] .lobby-utilities { grid-column:4; grid-row:1; position:relative; min-width:0; }
body[data-lobby-layout="reference"] .lobby-utilities > summary {
  display:grid; place-items:center; width:40px; height:44px; margin:0; padding:8px; border:0; border-radius:10px; list-style:none; cursor:pointer; color:var(--muted);
}
body[data-lobby-layout="reference"] .lobby-utilities > summary::-webkit-details-marker { display:none; }
body[data-lobby-layout="reference"] .lobby-utilities > summary svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
body[data-lobby-layout="reference"] :is(.lobby-profile-shortcut:hover,.lobby-utilities[open] > summary) { background:var(--raised); color:var(--accent); }
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .lobby-utilities .header-actions {
  position:absolute; inset:calc(100% + 12px) 0 auto auto; z-index:40; display:flex; flex-direction:column; align-items:stretch; flex-wrap:nowrap;
  width:min(280px,calc(100vw - 32px)); max-height:calc(100dvh - 120px); margin:0; padding:12px; gap:8px; overflow-y:auto;
  border:1px solid var(--line); border-radius:15px; background:var(--surface); box-shadow:0 18px 50px #0005;
}
body[data-lobby-layout="reference"] .lobby-utilities:not([open]) .header-actions { display:none!important; }
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .lobby-utilities :is(.theme-control,.sound-toggle,.player-menu,.header-settings,.header-logout,.header-bonus) {
  grid-column:auto; grid-row:auto; justify-self:auto; width:100%; min-height:44px; margin:0;
}
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .lobby-utilities :is(.theme-button,.sound-toggle,.player-menu-button,.header-settings,.header-logout,.header-bonus) {
  display:flex; justify-content:flex-start; align-items:center; width:100%; min-height:44px; padding:10px 12px; gap:10px; border:1px solid var(--line); border-radius:9px; background:var(--raised); color:var(--ink); font-size:12px;
}
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .lobby-utilities :is(.theme-button,.header-logout) > span { display:inline; }
/* Keep the guest submenu stacked inside the utility drawer, including phone headers. */
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .lobby-utilities .player-menu {
  flex-direction:column; align-items:stretch; gap:0;
}
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .lobby-utilities .player-menu-button {
  max-width:none; justify-content:space-between;
}
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .lobby-utilities #player-name { display:block; }
body[data-lobby-layout="reference"] .lobby-utilities .header-settings::after { content:attr(aria-label); }
body[data-lobby-layout="reference"] .lobby-utilities .sound-toggle::after { content:attr(aria-label); text-align:start; }
body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .lobby-utilities .player-menu-panel {
  position:relative; inset:auto; width:100%; max-width:none; margin-top:8px; box-shadow:none;
}
body[data-lobby-layout="reference"] .header-logout-status:not(:empty) { grid-column:1/-1; grid-row:2; width:100%; margin:0; font-size:12px; }

/* Remove the empty catalog frame, without changing opened game dimensions. */
body[data-game-ui="compact"][data-lobby-layout="reference"] .site-layout { display:grid; grid-template-columns:176px minmax(0,1fr); align-items:start; gap:24px; width:100%; max-width:calc(var(--lobby-width) + 200px); margin:0 auto; padding:0 var(--lobby-gutter); }
body[data-game-ui="compact"][data-lobby-layout="reference"] .site-layout:has(.lobby-sidebar.is-collapsed) { grid-template-columns:64px minmax(0,1fr); }
body[data-game-ui="compact"][data-lobby-layout="reference"] .site-layout > .flip-page { grid-column:2; grid-row:1; width:100%; min-width:0; padding:28px 0 36px; }
body[data-game-ui="compact"][data-lobby-layout="reference"] .site-layout > .flip-page.is-signed-in:has(#games-hub[data-game-view="catalog"]) { align-self:start; align-items:start; }
body[data-lobby-layout="reference"] #games-hub[data-game-type="games"][data-game-view="catalog"] { max-width:none; width:100%; }
body[data-lobby-layout="reference"] #games-hub[data-game-view="catalog"] .game-content > .game-panels { min-height:0; border:0; border-radius:0; background:none; box-shadow:none; }
body[data-lobby-layout="reference"] #games-hub[data-game-type="games"] .game-panels > #game-catalog {
  padding:0; gap:32px; border:0; border-radius:0; background:none; box-shadow:none; overflow:visible;
}
body[data-lobby-layout="reference"] #games-hub .catalog-holder { scroll-margin-top:96px; }
body[data-lobby-layout="reference"] .lobby-section-heading { display:flex; align-items:center; min-width:0; gap:10px; margin:0 0 16px; }
body[data-lobby-layout="reference"] #games-hub .lobby-section-heading h2 { display:flex; align-items:center; min-width:0; gap:10px; margin:0; font-size:21px; font-weight:800; letter-spacing:-.3px; line-height:1.35; }
body[data-lobby-layout="reference"] .lobby-section-icon { display:flex; flex:none; align-items:center; justify-content:center; width:22px; height:22px; color:var(--muted); }
body[data-lobby-layout="reference"] .lobby-section-icon svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
body[data-lobby-layout="reference"] .lobby-section-chevron { display:inline-flex; flex:none; align-items:center; justify-content:center; width:17px; height:22px; color:var(--muted); font-size:27px; font-weight:400; line-height:1; }
body[data-lobby-layout="reference"] .lobby-section-heading .visitor-stats { margin:0 0 0 auto; padding:0; width:auto; color:var(--muted); font-size:11px; }
body[data-lobby-layout="reference"] .lobby-section-heading .visitor-stat { gap:5px; }
body[data-lobby-layout="reference"] #games-hub #game-catalog .catalog-grid.game-tabs { grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
body[data-lobby-layout="reference"] #games-hub[data-game-type="games"] #game-catalog .game-tab:not(.case-tile) {
  width:100%; max-width:none; aspect-ratio:3/4; margin:0; padding:0; border:0; border-radius:16px; background:none; box-shadow:none;
}
body[data-lobby-layout="reference"] #games-hub #game-catalog .game-tile-art { width:100%; height:100%; padding:0; border:0; border-radius:16px; background:none; }
body[data-lobby-layout="reference"] #games-hub #game-catalog .game-tile-art > img { display:block; width:100%; height:100%; max-height:none; object-fit:contain; border-radius:16px; transition:filter .15s,transform .15s; }
body[data-lobby-layout="reference"] #games-hub #game-catalog .game-tab:hover .game-tile-art > img { transform:translateY(-2px); filter:brightness(1.07); }
body[data-lobby-layout="reference"] #games-hub #game-catalog .game-tab:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
body[data-lobby-layout="reference"] #games-hub #game-catalog .catalog-grid.cases-catalog { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
body[data-lobby-layout="reference"] #games-hub[data-game-type="games"] #game-catalog .case-tile {
  gap:5px; padding:14px 16px 18px; border:1px solid var(--line); border-radius:16px; background:radial-gradient(ellipse at 50% 25%,color-mix(in srgb,var(--accent) 16%,transparent),transparent 80%),var(--surface);
}
body[data-lobby-layout="reference"] #games-hub #game-catalog .case-tile > img { width:100%; max-height:180px; aspect-ratio:1.35; object-fit:contain; }
body[data-lobby-layout="reference"] #games-hub #game-catalog .case-tile-title { display:flex; align-items:center; justify-content:center; min-height:2.7em; font-size:16px; line-height:1.35; }
body[data-lobby-layout="reference"] #games-hub #game-catalog .case-tile-price { font-size:15px; color:var(--lavender); }

/* The VIP card renders the account's real level and progress. */
body[data-lobby-layout="reference"] .lobby-vip { scroll-margin-top:96px; }
body[data-lobby-layout="reference"] .lobby-vip-card { display:flex; align-items:center; width:100%; min-width:0; min-height:132px; padding:20px 24px; gap:22px; border:1px solid color-mix(in srgb,var(--line) 65%,transparent); border-radius:17px; background:var(--surface); }
body[data-lobby-layout="reference"] .lobby-vip-star { display:block; flex:none; width:84px; height:88px; overflow:visible; color:var(--accent); }
body[data-lobby-layout="reference"] .lobby-vip-details { display:grid; flex:1; min-width:0; gap:12px; }
body[data-lobby-layout="reference"] .lobby-vip-topline { display:flex; align-items:center; gap:8px; min-width:0; color:var(--ink); font-size:15px; font-weight:700; }
body[data-lobby-layout="reference"] #lobby-vip-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body[data-lobby-layout="reference"] .lobby-vip-name-chevron { flex:none; color:var(--muted); font-size:22px; font-weight:400; line-height:1; }
body[data-lobby-layout="reference"] #lobby-vip-percent { flex:none; margin-inline-start:auto; font-size:14px; font-variant-numeric:tabular-nums; font-weight:650; }
body[data-lobby-layout="reference"] #lobby-vip-progress { display:block; width:100%; height:11px; margin:0; overflow:hidden; border:0; border-radius:20px; background:var(--paper); accent-color:var(--accent); }
body[data-lobby-layout="reference"] #lobby-vip-progress::-webkit-progress-bar { background:var(--paper); border-radius:20px; }
body[data-lobby-layout="reference"] #lobby-vip-progress::-webkit-progress-value { border-radius:20px; background:linear-gradient(90deg,var(--lavender),var(--accent)); }
body[data-lobby-layout="reference"] #lobby-vip-progress::-moz-progress-bar { border-radius:20px; background:linear-gradient(90deg,var(--lavender),var(--accent)); }
body[data-lobby-layout="reference"] .lobby-vip-levels { display:flex; justify-content:space-between; gap:14px; color:var(--muted); font-size:12px; line-height:1.3; }

/* The same menu remains available beside the catalog and opened games. */
body[data-lobby-layout="reference"] .lobby-sidebar { position:sticky; top:calc(var(--lobby-header-height) + var(--ncb-tg-inset-top,0px) + 20px); z-index:30; grid-column:1; grid-row:1; align-self:start; min-width:0; width:100%; margin-top:28px; padding:7px; border:1px solid var(--line); border-radius:14px; background:var(--paper); }
body[data-lobby-layout="reference"] .lobby-sidebar-toggle { display:flex; align-items:center; justify-content:flex-start; gap:12px; width:100%; min-width:0; min-height:48px; margin:0 0 8px; padding:11px; border:0; border-bottom:1px solid var(--line); border-radius:8px 8px 0 0; background:none; color:var(--ink); font-size:13px; font-weight:750; line-height:1.3; text-align:start; cursor:pointer; }
body[data-lobby-layout="reference"] .lobby-sidebar-toggle svg { flex:none; width:23px; height:23px; }
body[data-lobby-layout="reference"] .lobby-sidebar-toggle:hover { background:var(--surface); }
body[data-lobby-layout="reference"] :is(.lobby-sidebar-toggle,.lobby-nav-item):focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
body[data-lobby-layout="reference"] .lobby-bottom-nav { display:grid; grid-auto-flow:row; grid-template-columns:minmax(0,1fr); align-items:stretch; width:100%; margin:0; padding:0; gap:5px; border:0; border-radius:0; background:none; }
body[data-lobby-layout="reference"] .lobby-nav-item { display:flex; flex-direction:row; align-items:center; justify-content:flex-start; min-width:0; min-height:48px; gap:12px; padding:11px; border:0; border-radius:9px; background:none; color:var(--muted); font-size:13px; font-weight:650; line-height:1.3; text-align:start; cursor:pointer; }
body[data-lobby-layout="reference"] .lobby-nav-item > span { min-width:0; overflow-wrap:anywhere; }
body[data-lobby-layout="reference"] .lobby-sidebar.is-collapsed :is(.lobby-sidebar-toggle,.lobby-nav-item) { justify-content:center; gap:0; padding-inline:8px; }
body[data-lobby-layout="reference"] .lobby-sidebar.is-collapsed :is(.lobby-sidebar-toggle,.lobby-nav-item) > span { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
body[data-lobby-layout="reference"] .lobby-nav-item svg { flex:none; width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
body[data-lobby-layout="reference"] .lobby-nav-item:is([aria-current="page"],[aria-pressed="true"],.is-active) { background:color-mix(in srgb,var(--accent) 12%,var(--paper)); color:var(--accent); }
body[data-lobby-layout="reference"] .lobby-nav-item:hover { background:var(--surface); color:var(--ink); }
body[data-lobby-layout="reference"] .lobby-nav-item[data-lobby-action="bonus"] { --bonus-gold-ink:#f2cf7a; --bonus-gold-hover:#ffe4a3; color:var(--bonus-gold-ink); background:linear-gradient(135deg,#bf8b2a30,#b57b1014); box-shadow:inset 0 0 0 1px #ce9b3f66; }
body[data-lobby-layout="reference"] .lobby-nav-item[data-lobby-action="bonus"]:hover { color:var(--bonus-gold-hover); background:linear-gradient(135deg,#d1a04445,#b57b1026); }
body[data-lobby-layout="reference"] .lobby-nav-item[data-lobby-action="bonus"]:focus-visible { outline:2px solid var(--bonus-gold-ink); outline-offset:3px; }
:root[data-theme="light"] body[data-lobby-layout="reference"] .lobby-nav-item[data-lobby-action="bonus"] { --bonus-gold-ink:#76500a; --bonus-gold-hover:#604000; }

body[data-lobby-layout="reference"] #logout-button:disabled { opacity:.55; cursor:wait; }
body[data-lobby-layout="reference"] .site-footer.game-footer { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:20px; width:100%; max-width:var(--lobby-width); margin:0 auto; padding:8px var(--lobby-gutter) 28px; border:0; text-align:center; }
body[data-lobby-layout="reference"] .lobby-footer-brand { display:flex; flex-direction:column; align-items:center; gap:0; margin:0; color:color-mix(in srgb,var(--ink) 86%,var(--muted)); font-size:28px; font-weight:900; line-height:.82; letter-spacing:-1px; }
body[data-lobby-layout="reference"] .lobby-footer-brand > span { font-size:22px; }
body[data-lobby-layout="reference"] .game-footer-actions { justify-content:center; gap:8px 18px; }
body[data-lobby-layout="reference"] .site-footer .game-footer-contact { min-height:32px; margin:0; padding:6px 0; border:0; border-radius:0; background:none; color:var(--muted); font-size:11px; }

@media(max-width:900px) {
  body[data-lobby-layout="reference"] { --lobby-header-height:64px; --lobby-gutter:16px; padding-bottom:max(env(safe-area-inset-bottom,0px),var(--ncb-tg-inset-bottom,0px)); }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .site-header.game-header:has(#header-settings) { min-height:64px; padding:10px max(var(--lobby-gutter),env(safe-area-inset-left,0px)); gap:8px; }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .brand { gap:0; }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .brand > span { display:none; }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .brand-logo { width:36px; height:36px; }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) > .header-profile { min-width:0; max-width:230px; width:100%; min-height:44px; padding:5px 8px; gap:7px; }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .site-header.game-header:has(#header-settings) { grid-template-columns:36px minmax(0,1fr) 42px 32px; }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .header-wallet-actions > .header-deposit { width:42px; min-width:42px; min-height:42px; padding:10px; }
  body[data-lobby-layout="reference"] .header-deposit > span { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  body[data-lobby-layout="reference"] .lobby-profile-shortcut,body[data-lobby-layout="reference"] .lobby-utilities > summary { width:32px; height:42px; padding:5px; }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .site-layout,
  body[data-game-ui="compact"][data-lobby-layout="reference"] .site-layout:has(.lobby-sidebar.is-collapsed) { grid-template-columns:56px minmax(0,1fr); gap:12px; padding-inline:max(8px,env(safe-area-inset-left,0px)); }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .site-layout > .flip-page { padding:20px 0 24px; }
  body[data-lobby-layout="reference"] .lobby-sidebar { top:calc(var(--lobby-header-height) + var(--ncb-tg-inset-top,0px) + 8px); width:56px; margin-top:20px; padding:5px; }
  body[data-lobby-layout="reference"] .lobby-sidebar:not(.is-collapsed) { width:min(224px,calc(100vw - 24px)); box-shadow:0 16px 38px #0005; }
  body[data-lobby-layout="reference"] .lobby-sidebar :is(.lobby-sidebar-toggle,.lobby-nav-item) { min-height:44px; font-size:13px; }
  body[data-lobby-layout="reference"] .lobby-sidebar.is-collapsed :is(.lobby-sidebar-toggle,.lobby-nav-item) { padding-inline:7px; }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .site-layout:has(#games-hub:not([data-game-view="catalog"])) { grid-template-columns:minmax(0,1fr); gap:0; }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .site-layout:has(#games-hub:not([data-game-view="catalog"])) > .flip-page { grid-column:1; grid-row:2; padding-top:12px; }
  body[data-lobby-layout="reference"] .site-layout:has(#games-hub:not([data-game-view="catalog"])) .lobby-sidebar { width:100%; margin-top:12px; padding:0; border:0; border-radius:0; box-shadow:none; }
  body[data-lobby-layout="reference"] .site-layout:has(#games-hub:not([data-game-view="catalog"])) .lobby-sidebar-toggle { width:44px; min-height:44px; margin:0; padding:10px; border:1px solid var(--line); border-radius:10px; background:var(--paper); }
  body[data-lobby-layout="reference"] .site-layout:has(#games-hub:not([data-game-view="catalog"])) .lobby-sidebar:not(.is-collapsed) .lobby-sidebar-toggle { width:min(224px,calc(100vw - 24px)); }
  body[data-lobby-layout="reference"] .site-layout:has(#games-hub:not([data-game-view="catalog"])) .lobby-sidebar .lobby-bottom-nav { position:absolute; inset:calc(100% + 6px) auto auto 0; width:min(224px,calc(100vw - 24px)); padding:7px; border:1px solid var(--line); border-radius:12px; background:var(--paper); box-shadow:0 16px 38px #0005; }
  body[data-lobby-layout="reference"] .site-layout:has(#games-hub:not([data-game-view="catalog"])) .lobby-sidebar.is-collapsed .lobby-bottom-nav { display:none; }
  body[data-lobby-layout="reference"] #games-hub[data-game-type="games"] .game-panels > #game-catalog { gap:30px; }
  body[data-lobby-layout="reference"] #games-hub #game-catalog .catalog-grid.game-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
  body[data-lobby-layout="reference"] #games-hub #game-catalog .catalog-grid.cases-catalog { gap:12px; }
  body[data-lobby-layout="reference"] .lobby-vip-card { min-height:116px; padding:16px 18px; gap:18px; }
  body[data-lobby-layout="reference"] .lobby-vip-star { width:76px; height:80px; }
  body[data-lobby-layout="reference"] .lobby-section-heading { gap:8px; margin-bottom:14px; }
  body[data-lobby-layout="reference"] #games-hub .lobby-section-heading h2 { font-size:20px; }
  body[data-lobby-layout="reference"] #games-hub[data-game-type="games"] #game-catalog .case-tile { padding:10px 8px 13px; gap:4px; }
  body[data-lobby-layout="reference"] #games-hub #game-catalog .case-tile-title { font-size:13px; }
  body[data-lobby-layout="reference"] #games-hub #game-catalog .case-tile-price { font-size:13px; }
}
@media(max-width:600px) {
  body[data-lobby-layout="reference"] #games-hub #game-catalog .catalog-grid.game-tabs,
  body[data-lobby-layout="reference"] #games-hub #game-catalog .catalog-grid.cases-catalog { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body[data-lobby-layout="reference"] #lobby-slots .tts-library-filters button { min-width:0; overflow-wrap:anywhere; }
}
@media(max-width:380px) {
  body[data-game-ui="compact"][data-lobby-layout="reference"] .site-header.game-header:has(#header-settings) { grid-template-columns:32px minmax(0,1fr) 40px 30px; gap:6px; }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .brand-logo { width:32px; height:32px; }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .header-wallet-actions > .header-deposit { width:40px; min-width:40px; }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) > .header-profile { padding-inline:6px; }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .header-profile .header-usd-balance { gap:4px; }
  body[data-game-ui="compact"][data-lobby-layout="reference"] .game-header:has(#header-settings) .header-profile .header-usd-total:not(.is-unavailable) { font-size:14px; }
  body[data-lobby-layout="reference"] .header-profile .header-usd-label { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  body[data-lobby-layout="reference"] .lobby-currency-badge { width:18px; height:18px; font-size:12px; }
  body[data-lobby-layout="reference"] .lobby-profile-shortcut,body[data-lobby-layout="reference"] .lobby-utilities > summary { width:30px; }
  body[data-lobby-layout="reference"] #games-hub #game-catalog .catalog-grid.game-tabs,body[data-lobby-layout="reference"] #games-hub #game-catalog .catalog-grid.cases-catalog { gap:10px; }
  body[data-lobby-layout="reference"] .lobby-vip-card { padding:15px 12px; gap:12px; }
  body[data-lobby-layout="reference"] .lobby-vip-star { width:65px; height:70px; }
  body[data-lobby-layout="reference"] .lobby-vip-topline { font-size:13px; gap:6px; }
  body[data-lobby-layout="reference"] #lobby-vip-percent { font-size:12px; }
  body[data-lobby-layout="reference"] .lobby-vip-levels { font-size:11px; }
  body[data-lobby-layout="reference"] #games-hub .lobby-section-heading h2 { font-size:18px; }
  body[data-lobby-layout="reference"] .lobby-section-heading .visitor-stats { font-size:10px; }
  body[data-lobby-layout="reference"] #games-hub #game-catalog .case-tile-title { font-size:12px; }
}
html.telegram-mini-app body[data-game-ui="compact"][data-lobby-layout="reference"] .site-header.game-header:has(#header-settings) { top:var(--ncb-tg-inset-top,0px); }
html.telegram-mini-app body[data-lobby-layout="reference"] .lobby-utilities .header-actions { max-height:calc(var(--ncb-tg-viewport-height,100dvh) - var(--ncb-tg-inset-top,0px) - var(--ncb-tg-inset-bottom,0px) - 90px); }
@media(max-width:900px) {
  html.telegram-mini-app body[data-game-ui="compact"][data-lobby-layout="reference"] { padding-bottom:var(--ncb-tg-inset-bottom,0px); }
}
@media(prefers-reduced-motion:reduce) {
  body[data-lobby-layout="reference"] #games-hub #game-catalog .game-tile-art > img { transition:none; }
  body[data-lobby-layout="reference"] #games-hub #game-catalog .game-tab:hover .game-tile-art > img { transform:none; }
}

/* Slot posters keep two balanced columns on phones and tablets. */
@media(max-width:900px) {
  body[data-lobby-layout="reference"] #games-hub #game-catalog .catalog-grid.game-tabs.slots-catalog { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body[data-lobby-layout="reference"] #lobby-slots .tts-demo-games-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
