/* ==========================================================================
   Lobby: promo banners, live wins, the weekly top ten, category bar, game rows and tiles, studios, game rooms,
   and the page that hosts studio games. Builds on the tokens in site.css.
   ========================================================================== */

/* One column that never grows past the page: sideways rails scroll inside it instead of widening it. */
.lobby { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.lobby > * { min-width: 0; }
.lobby-public { padding: 22px 0 10px; }

/* ---------- Section heads ---------- */

.lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.lobby-head h2 { display: flex; align-items: center; gap: 0.6rem; margin: 0; font-size: clamp(1.05rem, 1.6vw, 1.25rem); letter-spacing: 0.02em; }
.lobby-head h2 .head-ico {
    display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px;
    background: linear-gradient(145deg, rgba(155, 107, 255, 0.35), rgba(124, 58, 237, 0.15)); color: var(--gold); font-size: 1rem;
    box-shadow: inset 0 0 0 1px rgba(196, 170, 255, 0.25);
}
.lobby-head h2 small { color: var(--muted); font: 600 0.78rem var(--font-ui); letter-spacing: 0; }
.lobby-head-tools { display: flex; align-items: center; gap: 6px; }
.view-all {
    display: inline-flex; align-items: center; gap: 0.35rem; min-height: 34px; padding: 0 0.85rem;
    border: 1px solid var(--border-strong); border-radius: 10px; color: var(--ink); font-size: 0.82rem; font-weight: 700;
}
.view-all:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.row-arrow {
    display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border-strong); border-radius: 50%;
    background: rgba(255, 255, 255, 0.04); color: var(--ink); cursor: pointer;
}
.row-arrow:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.row-arrow:disabled { opacity: 0.3; cursor: default; }

.scroll-track { scrollbar-width: none; -ms-overflow-style: none; }
.scroll-track::-webkit-scrollbar { display: none; }

/* ---------- Promo banners with marquee-light frames ---------- */

.promo-rail-wrap { position: relative; min-width: 0; }
.promo-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 18px) / 2);
    gap: 18px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding: 2px;
}
.promo {
    --frame: 11px;
    position: relative;
    display: grid;
    scroll-snap-align: start;
    padding: var(--frame);
    border-radius: 24px;
    background: linear-gradient(135deg, #fff1b8 0%, #f5b33b 22%, #9a5b10 45%, #ffd56a 62%, #b06d14 82%, #ffe7a0 100%);
    box-shadow: 0 18px 40px rgba(5, 2, 14, 0.55), 0 0 32px rgba(245, 165, 36, 0.2);
}
/* Bulbs: a dot pattern drawn only on the frame, scaled so whole bulbs fit every edge. */
.promo::before, .promo::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: var(--frame);
    border-radius: inherit;
    pointer-events: none;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.promo::before {
    background: radial-gradient(circle, #fffbe6 0 2.2px, #ffd76a 3px, rgba(255, 196, 64, 0.35) 4.6px, transparent 5.4px) -3px -3px / 22px 22px round;
    animation: bulbs 1.6s steps(2, jump-none) infinite;
}
.promo::after {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1.6px, transparent 2.4px) 8px 8px / 22px 22px round;
    opacity: 0;
    animation: bulbs 1.6s steps(2, jump-none) infinite reverse;
}
@keyframes bulbs { from { opacity: 1; } to { opacity: 0.45; } }

.promo-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    min-height: clamp(210px, 22vw, 268px);
    overflow: hidden;
    border-radius: 14px;
    isolation: isolate;
    background: #1c0f3d;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(0, 0, 0, 0.55);
}
.promo-inner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--promo-bg); }
.promo-copy { position: relative; z-index: 1; display: grid; justify-items: start; gap: 8px; padding: clamp(16px, 2.4vw, 28px); }
.promo-copy .tag {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 3px 10px; border-radius: 999px;
    background: rgba(12, 7, 25, 0.55); border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
}
.promo-copy h2 {
    margin: 0;
    font: 400 clamp(1.7rem, 3vw, 2.65rem)/0.95 var(--font-display);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), 0 10px 26px rgba(0, 0, 0, 0.45);
}
.promo-copy h2 em {
    display: block;
    font-style: normal;
    background: linear-gradient(180deg, #fff8d8 0%, #ffd56a 45%, #f5a524 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 3px 0 rgba(90, 44, 0, 0.55));
}
.promo-copy p { max-width: 34ch; margin: 0; color: rgba(255, 255, 255, 0.86); font-size: 0.88rem; font-weight: 500; }
.promo-copy .button { margin-top: 6px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.06em; }
/* Art is positioned, so it can never decide the banner's height. */
.promo-art { position: relative; align-self: stretch; min-height: 100%; }
.promo-art img {
    position: absolute; left: 50%; top: 50%; translate: -50% -50%;
    width: auto; height: 90%; max-width: 112%; object-fit: contain;
    filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.55));
}

.theme-violet { --promo-bg: radial-gradient(circle at 78% 50%, rgba(255, 201, 77, 0.35), transparent 42%), radial-gradient(circle at 10% 110%, rgba(236, 79, 208, 0.55), transparent 50%), linear-gradient(120deg, #3b1676 0%, #6d28d9 55%, #a21caf 100%); }
.theme-inferno { --promo-bg: radial-gradient(circle at 80% 40%, rgba(255, 186, 73, 0.45), transparent 45%), linear-gradient(120deg, #2b0707 0%, #7f1d1d 45%, #ea580c 100%); }
.theme-emerald { --promo-bg: radial-gradient(circle at 80% 45%, rgba(255, 201, 77, 0.38), transparent 45%), linear-gradient(120deg, #052e2b 0%, #047857 50%, #10b981 100%); }
.theme-night { --promo-bg: radial-gradient(circle at 75% 50%, rgba(155, 107, 255, 0.5), transparent 48%), linear-gradient(120deg, #0b1033 0%, #1e1b6b 50%, #4c1d95 100%); }
.theme-sunset { --promo-bg: radial-gradient(circle at 78% 40%, rgba(255, 239, 170, 0.45), transparent 42%), linear-gradient(120deg, #3a0d4f 0%, #be185d 55%, #f59e0b 100%); }

.promo-art.spin img { height: 116%; max-width: none; animation: wheel-spin 60s linear infinite; }
@keyframes wheel-spin { to { transform: rotate(360deg); } }
.promo-art.fan img {
    height: 80%; width: auto; aspect-ratio: 3 / 4; max-width: none; border-radius: 12px; object-fit: cover; filter: none;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.promo-art.fan img:nth-child(1) { transform: translateX(-52%) rotate(-11deg) scale(0.84); }
.promo-art.fan img:nth-child(2) { z-index: 1; }
.promo-art.fan img:nth-child(3) { transform: translateX(52%) rotate(11deg) scale(0.84); }
.promo-art.cover img {
    inset: 0; translate: none; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 35%; filter: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%);
}

.promo-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.promo-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--raised-2); cursor: pointer; transition: width 0.2s, background-color 0.2s; }
.promo-dots button[aria-current="true"] { width: 22px; background: var(--gold); }

/* ---------- Live wins ---------- */

.live-wins {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(24, 15, 50, 0.72);
    backdrop-filter: blur(8px);
}
.live-label { display: flex; flex: none; align-items: center; gap: 8px; color: var(--ink); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); animation: live-pulse 1.8s ease-out infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.live-viewport { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.live-track { display: flex; gap: 10px; width: max-content; }
.live-track.is-moving { animation: marquee var(--marquee, 50s) linear infinite; }
.live-viewport:hover .live-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.win-chip {
    display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 6px 14px 6px 6px;
    border: 1px solid var(--border); border-radius: 14px; background: rgba(255, 255, 255, 0.035); color: var(--ink);
}
.win-chip:hover { border-color: rgba(255, 201, 77, 0.45); color: var(--ink); }
.win-chip img { width: 44px; height: 44px; flex: none; border-radius: 10px; object-fit: cover; }
.win-chip span { display: grid; min-width: 0; line-height: 1.25; }
.win-chip strong { font-size: 0.84rem; }
.win-chip small { overflow: hidden; color: var(--muted); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.win-chip b { display: inline-flex; align-items: center; gap: 4px; font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.win-chip b.coin-GC { color: var(--gold); }
.win-chip b.coin-SC { color: var(--sc); }
.win-chip .coin-ico { width: 16px; height: 16px; }
.live-empty { margin: 0; padding-left: 14px; color: var(--muted); font-size: 0.85rem; }

/* ---------- Category bar ---------- */

.cat-bar-wrap { position: sticky; top: calc(var(--topbar) + 8px); z-index: 20; display: flex; align-items: center; gap: 10px; }
.cat-bar {
    display: flex; flex: 1; gap: 6px; min-width: 0; overflow-x: auto; padding: 6px;
    border: 1px solid var(--border); border-radius: 16px; background: rgba(20, 12, 42, 0.86); backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(5, 2, 14, 0.4);
    /* Fades the last tab so it reads as "there is more to scroll to". */
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
}
.cat-bar::after { content: ""; flex: 0 0 32px; }
.cat-tab {
    display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 1rem;
    border-radius: 12px; color: var(--ink-2); font-weight: 700; font-size: 0.9rem; white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
}
.cat-tab i { color: var(--violet); font-size: 1.05rem; }
.cat-tab:hover { background: rgba(155, 107, 255, 0.14); color: var(--ink); }
.cat-tab.is-active { background: linear-gradient(180deg, rgba(255, 201, 77, 0.28), rgba(255, 201, 77, 0.08)); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 201, 77, 0.45); }
.cat-tab.is-active i { color: var(--gold); }
.cat-tab .count { padding: 0 0.4rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--muted); font-size: 0.68rem; }

.lobby-search { position: relative; flex: 0 1 300px; }
.lobby-search .input { min-height: 56px; padding-left: 2.6rem; border-radius: 16px; background: rgba(20, 12, 42, 0.86); }
.lobby-search > i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

.search-pop {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60; display: grid; gap: 2px; max-height: 420px; overflow-y: auto; padding: 6px;
    border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow);
}
.search-pop a { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; color: var(--ink); }
.search-pop a:hover, .search-pop a:focus { background: var(--raised); color: var(--ink); }
.search-pop img { width: 36px; height: 48px; flex: none; border-radius: 6px; object-fit: cover; }
.search-pop span { display: grid; min-width: 0; line-height: 1.25; }
.search-pop strong { overflow: hidden; font-size: 0.88rem; text-overflow: ellipsis; white-space: nowrap; }
.search-pop small { color: var(--muted); font-size: 0.74rem; }
.search-pop p { margin: 0; padding: 10px; color: var(--muted); font-size: 0.85rem; }

/* ---------- Rows and tiles ---------- */

.game-row-track {
    --card-w: 170px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--card-w);
    gap: 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding: 6px 2px 10px;
}

.gcard { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; scroll-snap-align: start; }
.gcard-art {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(160deg, var(--raised-2), var(--surface));
    box-shadow: 0 10px 24px rgba(4, 1, 12, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gcard-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gcard-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 7, 25, 0) 50%, rgba(12, 7, 25, 0.82)); opacity: 0; transition: opacity 0.25s; }
.gcard.is-original .gcard-art::after { opacity: 1; background: linear-gradient(180deg, rgba(12, 7, 25, 0) 42%, rgba(12, 7, 25, 0.92)); }
.gcard:hover .gcard-art, .gcard-art:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(4, 1, 12, 0.6), 0 0 0 2px rgba(255, 201, 77, 0.7), 0 0 30px rgba(155, 107, 255, 0.45);
}
.gcard:hover .gcard-art img { transform: scale(1.06); }
.gcard:hover .gcard-art::after { opacity: 1; }
.gcard-play {
    position: absolute; left: 50%; top: 46%; z-index: 3;
    display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
    background: linear-gradient(180deg, #ffe08a, #f5a524); color: var(--gold-ink); font-size: 1.7rem;
    box-shadow: 0 10px 24px rgba(245, 165, 36, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    opacity: 0; transform: translate(-50%, -50%) scale(0.7); transition: opacity 0.2s, transform 0.2s;
}
.gcard-play i { margin-left: 3px; }
.gcard:hover .gcard-play, .gcard-art:focus-visible .gcard-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.gcard-badges { position: absolute; left: 8px; top: 8px; z-index: 3; display: grid; justify-items: start; gap: 4px; }
.badge { padding: 2px 7px; border-radius: 6px; font: 800 0.6rem/1.45 var(--font-ui); letter-spacing: 0.09em; text-transform: uppercase; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.badge.new { background: linear-gradient(90deg, #7c3aed, #ec4fd0); color: #fff; }
.badge.jackpot { background: linear-gradient(90deg, #ffe08a, #f5a524); color: var(--gold-ink); }
.badge.original { background: rgba(12, 7, 25, 0.82); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 201, 77, 0.5); }
.badge.hot { background: linear-gradient(90deg, #f97316, #dc2626); color: #fff; }
.gcard-title {
    position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2;
    font: 400 clamp(1rem, 1.5vw, 1.2rem)/1 var(--font-display); letter-spacing: 0.03em; text-transform: uppercase;
    background: linear-gradient(180deg, #fff8d8, #ffd56a 55%, #f5a524);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 2px 0 rgba(40, 18, 0, 0.8)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}
.gcard-meta { display: grid; gap: 1px; min-width: 0; padding: 0 2px; }
.gcard-meta strong { overflow: hidden; font-size: 0.86rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.gcard-meta small { overflow: hidden; color: var(--muted); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.gcard .fav-button {
    position: absolute; right: 8px; top: 8px; z-index: 4;
    display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
    border: 0; border-radius: 50%; background: rgba(12, 7, 25, 0.72); color: var(--ink-2); cursor: pointer; backdrop-filter: blur(4px);
}
.gcard .fav-button:hover { color: var(--ink); }
.gcard .fav-button[aria-pressed="true"] { color: var(--gold); }

/* ---------- Top ten ---------- */

.top-ten-track { --card-w: 236px; gap: 4px; }
.rank-card { position: relative; display: flex; align-items: flex-end; justify-content: flex-end; scroll-snap-align: start; padding: 4px 0 0; }
.rank-card .gcard { width: 156px; z-index: 1; }
.rank-num {
    position: absolute; left: -2px; bottom: 34px; z-index: 0;
    font: 400 8.6rem/0.78 var(--font-display);
    letter-spacing: -0.04em;
    background: linear-gradient(180deg, #fff1b8 0%, #ffc94d 35%, #f5a524 55%, #9b6bff 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    -webkit-text-stroke: 2px rgba(12, 7, 25, 0.9);
    filter: drop-shadow(0 6px 0 rgba(76, 29, 149, 0.9)) drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55));
    user-select: none;
}
.rank-card.is-wide { --card-w: 276px; }
.rank-card.is-wide .rank-num { letter-spacing: -0.09em; }

/* ---------- Game rooms ---------- */

.rooms-track { --card-w: 250px; }
.room-card {
    position: relative; display: grid; gap: 0; overflow: hidden; scroll-snap-align: start;
    border: 1px solid var(--border); border-radius: 16px; background: var(--surface-glass); color: var(--ink);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.room-card:hover { transform: translateY(-3px); border-color: rgba(255, 201, 77, 0.55); color: var(--ink); box-shadow: 0 0 26px rgba(155, 107, 255, 0.35); }
.room-card .room-art { aspect-ratio: 16 / 10; background: var(--raised) center / cover no-repeat; }
.room-card .room-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.room-card strong { display: block; font-family: var(--font-brand); font-size: 1rem; }
.room-card small { color: var(--muted); font-size: 0.74rem; }
.room-card.is-soon .room-art { filter: grayscale(0.7) brightness(0.65); }
.room-gc { display: inline-flex; align-items: center; gap: 0.3rem; padding: 2px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-size: 0.7rem; font-weight: 800; white-space: nowrap; }
.room-gc .coin-ico { width: 14px; height: 14px; }

/* ---------- Studios ---------- */

.providers-track { --card-w: 220px; }
.provider-card {
    display: grid; place-items: center; gap: 6px; height: 112px; padding: 14px; scroll-snap-align: start;
    border: 1px solid var(--border); border-radius: 16px; color: var(--ink);
    background: radial-gradient(circle at 50% 0, rgba(155, 107, 255, 0.3), transparent 70%), rgba(24, 15, 50, 0.8);
    transition: border-color 0.2s, transform 0.2s;
}
.provider-card:hover { border-color: rgba(255, 201, 77, 0.55); color: var(--ink); transform: translateY(-2px); }
.provider-card img { max-height: 54px; max-width: 170px; width: auto; }
.provider-card .provider-word { font: 400 1.35rem/1 var(--font-display); letter-spacing: 0.05em; text-transform: uppercase; text-align: center; }
.provider-card small { color: var(--muted); font-size: 0.74rem; font-weight: 600; }
.originals-word { display: flex; align-items: center; gap: 8px; }
.originals-word svg { width: 34px; height: 34px; }

/* ---------- Visitors: how it works ---------- */

.how-it-works .step { background: radial-gradient(circle at 100% 0, rgba(155, 107, 255, 0.22), transparent 55%), var(--surface-glass); }

/* ---------- Browse page ---------- */

.browse-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.browse-head h1 { display: flex; align-items: center; gap: 0.7rem; margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.browse-head h1 .head-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(145deg, rgba(155, 107, 255, 0.4), rgba(124, 58, 237, 0.15)); color: var(--gold); font-size: 1.3rem; }
.browse-head p { margin: 0.3rem 0 0; color: var(--ink-2); }
.browse-grid { display: grid; gap: 18px 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 18px; }
.browse-empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.studio-filter { min-width: min(100%, 260px); }
.studio-filter .input { min-height: 44px; border-radius: 12px; }
.browse-pager { display: grid; justify-items: center; gap: 10px; margin: 28px 0 8px; }
.browse-pager p { margin: 0; font-size: 0.85rem; }
.studio-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

/* ---------- Studio game page ---------- */

html.studio-page, html.studio-page body { height: 100%; }
html.studio-page body { overflow: hidden; background: #07040f; }
html.studio-page body::before { display: none; }
.studio-shell { display: flex; flex-direction: column; height: 100dvh; }
.studio-bar {
    display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 6px clamp(8px, 1.6vw, 18px);
    border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(30, 18, 62, 0.98), rgba(14, 8, 30, 0.98));
}
.studio-title { flex: 1; min-width: 0; }
.studio-title h1 { margin: 0; overflow: hidden; font-size: 1.02rem; text-overflow: ellipsis; white-space: nowrap; }
.studio-title p { margin: 0; overflow: hidden; color: var(--muted); font-size: 0.74rem; text-overflow: ellipsis; white-space: nowrap; }
.studio-icon {
    display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 0.6rem;
    border: 1px solid var(--border-strong); border-radius: 12px; background: rgba(255, 255, 255, 0.04); color: var(--ink); cursor: pointer; font-size: 1rem;
}
.studio-icon:hover { color: var(--gold); border-color: rgba(255, 201, 77, 0.5); }
.studio-icon[aria-pressed="true"] { color: var(--gold); }
.studio-stage { position: relative; flex: 1; min-height: 0; background: #000; }
.studio-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.studio-overlay {
    position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 20px; overflow: hidden; text-align: center;
    background: #0c0719;
}
.studio-overlay::before { content: ""; position: absolute; inset: -40px; z-index: -1; background: var(--art) center / cover no-repeat; filter: blur(28px) brightness(0.45) saturate(1.2); }
.studio-overlay[hidden] { display: none; }
.studio-card { display: grid; justify-items: center; gap: 12px; max-width: 420px; }
.studio-card img { width: 150px; aspect-ratio: 3 / 4; border-radius: 16px; object-fit: cover; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 201, 77, 0.6); }
.studio-card h2 { margin: 0; font-size: 1.3rem; }
.studio-card p { margin: 0; color: var(--ink-2); }
.studio-loader { width: 46px; height: 46px; border: 4px solid rgba(255, 255, 255, 0.15); border-top-color: var(--gold); border-radius: 50%; animation: wheel-spin 0.9s linear infinite; }
.studio-note { margin: 0; padding: 6px 12px; color: var(--muted); font-size: 0.72rem; text-align: center; background: #07040f; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .promo-rail { grid-auto-columns: 86%; }
}

@media (max-width: 960px) {
    .lobby { gap: 20px; }
    .cat-bar-wrap { top: 70px; }
    .lobby-search { display: none; }
    .promo-inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
}

@media (max-width: 640px) {
    .promo-rail { grid-auto-columns: 94%; gap: 12px; }
    .promo { --frame: 8px; border-radius: 18px; }
    .promo-inner { min-height: 188px; }
    .promo-copy { padding: 14px; gap: 6px; }
    .promo-copy p { font-size: 0.78rem; }
    .promo-copy .button { min-height: 36px; padding: 0.4rem 0.9rem; font-size: 0.78rem; }
    .game-row-track { --card-w: 128px; gap: 10px; }
    .top-ten-track { --card-w: 184px; }
    .rank-card .gcard { width: 124px; }
    .rank-card.is-wide { --card-w: 214px; }
    .rank-num { font-size: 6.4rem; bottom: 34px; }
    .rooms-track { --card-w: 210px; }
    .providers-track { --card-w: 170px; }
    .live-label span:not(.live-dot) { display: none; }
    .win-chip { min-width: 180px; }
    .browse-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px 10px; }
    .studio-title p { display: none; }
    .studio-bar { gap: 6px; }
    .studio-icon { min-width: 36px; height: 36px; padding: 0 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    .live-track.is-moving { animation: none; }
    .promo-art.spin img { animation: none; }
}
