/* Hub: the calm game library home. A still backdrop, one lamp colour for the primary action,
   motion only when the player touches something. Builds on /style.css and the shell tokens. */

:root {
  --ink: #0e1120;
  --surface: #151a2c;
  --surface-2: #1c2238;
  --line: rgba(206, 214, 255, 0.09);
  --line-strong: rgba(206, 214, 255, 0.17);
  --soft: #aab0c8;
  --lamp: #f2b45c;
  --lamp-ink: #2a1c06;
  --sage: #9cc5b0;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: max(20px, env(safe-area-inset-left));
}

html:has(body.hub-page), body.hub-page { background: var(--ink); }

.hub-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hub-backdrop svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hub-shade {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--ink) 0%, rgba(14, 17, 32, 0.9) 30%, rgba(14, 17, 32, 0.25) 62%, rgba(14, 17, 32, 0.15) 100%),
    linear-gradient(180deg, rgba(14, 17, 32, 0) 45%, rgba(14, 17, 32, 0.85) 82%, var(--ink) 100%);
}
.hub-shade::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(14, 17, 32, 0.72);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.hub-scrolled .hub-shade::after { opacity: 1; }
body.live-bg .hub-backdrop { display: none; }
body.live-bg .hub-shade { background: linear-gradient(90deg, rgba(14, 17, 32, 0.85) 0%, rgba(14, 17, 32, 0.2) 70%), linear-gradient(180deg, transparent 50%, var(--ink) 100%); }

.hub-root {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 max(24px, env(safe-area-inset-right)) calc(max(24px, env(safe-area-inset-bottom)) + 96px) max(24px, env(safe-area-inset-left));
  scroll-padding-top: calc(var(--top) + 72px);
}
.hub-root > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
body.gchat-docked .hub-root { padding-left: 360px; }

.hub-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  height: calc(var(--top) + 46px);
  padding-top: var(--top);
}
.hub-mark { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; border-radius: 10px; }
.hub-mark:focus-visible { outline: 2px solid var(--lamp); outline-offset: 4px; }
.hub-mark svg { flex-shrink: 0; }
.hub-mark-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; opacity: 0; transition: opacity 0.2s; }
.hub-scrolled .hub-mark-name { opacity: 1; }

.hub-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(56px, 14vh, 150px) 0 clamp(48px, 9vh, 96px);
}
.hub-brand {
  margin: 0;
  font-size: clamp(44px, 6.6vw, 84px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: #f3f0e8;
}
.hub-hello {
  margin: 22px 0 0;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text);
}
.hub-lead { margin: 10px 0 0; max-width: 40ch; font-size: 16px; line-height: 1.55; color: var(--soft); }
.hub-hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }
.hub-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 26px 0 8px;
  font-size: 17px;
  font-weight: 600;
  color: var(--lamp-ink);
  text-decoration: none;
  background: var(--lamp);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(242, 180, 92, 0.18);
  transition: transform 0.12s var(--ease-out), filter 0.15s;
}
.hub-cta[hidden] { display: none; }
.hub-cta:hover { filter: brightness(1.05); }
.hub-cta:active { transform: scale(0.97); }
.hub-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hub-cta-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(42, 28, 6, 0.12); }
.hub-top { display: flex; align-items: center; gap: 8px; }
.hub-top .live-count {
  animation: none;
  gap: 8px;
  padding: 0;
  color: var(--soft);
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.hub-top .live-dot { width: 8px; height: 8px; background: #6fd39b; box-shadow: none; }
.hub-top .live-dot::after { display: none; }
.hub-top .live-num { font-size: 15px; font-weight: 600; color: var(--text); text-shadow: none; }
.hub-top .live-label { font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--soft); }
.hub-top .live-count.bump .live-num { animation: none; }

.hub-section { padding: 26px 0 18px; }
.hub-section[hidden] { display: none; }
.hub-section-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 18px; }
.hub-h2 { margin: 0; font-size: clamp(22px, 2.4vw, 26px); font-weight: 600; letter-spacing: -0.02em; }
.hub-section-hint { margin: 0; flex: 1 1 280px; font-size: 15px; color: var(--soft); }
.hub-section-head .btn { margin-left: auto; }

/* Library */
.hub-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: border-color 0.15s, transform 0.15s var(--ease-out);
}
.game-card.is-active { border-color: var(--line-strong); }
@media (hover: hover) {
  .game-card:not(.is-off):hover { transform: translateY(-2px); }
}
.gc-preview { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0b0e1c; cursor: pointer; }
.gc-preview svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gc-live { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.2s; }
.gc-preview.has-live .gc-live { opacity: 1; }
.gc-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.gc-head { display: flex; align-items: center; gap: 10px; }
.gc-name { margin: 0; flex: 1; min-width: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.gc-link { color: inherit; text-decoration: none; }
.gc-link::after { content: ''; position: absolute; inset: 0; z-index: 0; }
.gc-link:focus-visible { outline: none; }
.game-card:has(.gc-link:focus-visible) { outline: 2px solid var(--lamp); outline-offset: 2px; }
.gc-tagline { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--soft); }
.gc-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; color: #8a90a8; font-variant-numeric: tabular-nums; }
.gc-online { display: inline-flex; align-items: center; gap: 6px; }
.gc-online.on { color: #bfe9d0; }
.gc-dot { width: 7px; height: 7px; border-radius: 50%; background: #59607a; }
.gc-online.on .gc-dot { background: #6fd39b; }
.gc-off-text { color: #e8c9a0; }
.gc-actions { position: relative; z-index: 1; display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.gc-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: background-color 0.15s, transform 0.1s var(--ease-out);
}
.gc-play:hover { background: #262d48; }
.gc-play:active { transform: scale(0.97); }
.gc-play:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.gc-play.disabled { opacity: 0.45; pointer-events: none; }
.gc-badge { flex-shrink: 0; padding: 3px 10px; font-size: 12px; font-weight: 600; border-radius: 999px; color: #e8c9a0; background: rgba(232, 201, 160, 0.1); }
.game-card.is-off .gc-preview svg { filter: grayscale(0.85) brightness(0.65); }
.game-card.is-off .gc-preview { cursor: default; }

/* Card art moves only while the card is active. */
.game-card.is-active .art-float { animation: art-float 3.2s ease-in-out infinite; transform-box: fill-box; }
.game-card.is-active .art-d1 { animation-delay: -1s; }
.game-card.is-active .art-d2 { animation-delay: -2s; }
.game-card.is-active .art-drop { animation: art-drop 2.2s cubic-bezier(0.5, 0, 0.75, 0) infinite; }
.game-card.is-active .art-line { stroke-dasharray: 200; animation: art-line 2.6s ease-in-out infinite; }
@keyframes art-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes art-drop { 0% { transform: translateY(-30px); opacity: 0; } 15% { opacity: 1; } 55%, 100% { transform: translateY(8px); opacity: 1; } }
@keyframes art-line { 0% { stroke-dashoffset: 200; } 60%, 100% { stroke-dashoffset: 0; } }

/* Coming soon */
.hub-soon { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.soon-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: rgba(21, 26, 44, 0.7);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.soon-card .gc-preview { aspect-ratio: 16 / 9; cursor: default; }
.soon-card .gc-preview svg { filter: saturate(0.8); }
.soon-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.soon-name { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.soon-tagline { margin: 0; font-size: 14px; line-height: 1.45; color: var(--soft); }
.soon-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: auto; padding-top: 8px; }
.soon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--sage);
  background: none;
  border: 1px solid rgba(156, 197, 176, 0.45);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s var(--ease-out);
}
.soon-btn:hover:not(:disabled) { background: rgba(156, 197, 176, 0.1); }
.soon-btn:active:not(:disabled) { transform: scale(0.97); }
.soon-btn:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.soon-btn.done { color: #10231a; background: var(--sage); border-color: var(--sage); cursor: default; }
.soon-count { font-size: 13px; color: #8a90a8; font-variant-numeric: tabular-nums; }

/* Gameplay clips over the still art; they fade in once a poster or a frame is ready. */
.gc-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.35s var(--ease-out); pointer-events: none; }
.gc-preview.has-poster .gc-video, .gc-preview.has-video .gc-video { opacity: 1; }

/* You: profile summary and friends side by side */
.hub-you { padding-top: 34px; }
.hub-you-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.pc, .fl { position: relative; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }

.pc-banner {
  height: 76px;
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(242, 180, 92, 0.22), transparent 60%),
    radial-gradient(90% 120% at 92% 10%, rgba(156, 197, 176, 0.16), transparent 60%),
    linear-gradient(180deg, #1d2440, var(--surface));
}
.pc-vip-silver .pc-banner { background: radial-gradient(120% 140% at 12% 0%, rgba(210, 220, 235, 0.24), transparent 60%), linear-gradient(180deg, #232a44, var(--surface)); }
.pc-vip-gold .pc-banner { background: radial-gradient(120% 140% at 12% 0%, rgba(255, 197, 61, 0.3), transparent 60%), linear-gradient(180deg, #2a2640, var(--surface)); }
.pc-vip-diamond .pc-banner { background: radial-gradient(120% 140% at 12% 0%, rgba(120, 210, 255, 0.28), transparent 60%), radial-gradient(90% 120% at 92% 10%, rgba(190, 150, 255, 0.2), transparent 60%), linear-gradient(180deg, #1e2748, var(--surface)); }
.pc-head { display: flex; align-items: flex-end; gap: 16px; margin-top: -44px; padding: 0 20px; }
.pc-avatar { flex-shrink: 0; padding: 4px; font: inherit; background: var(--surface); border: 0; border-radius: 50%; cursor: pointer; }
.pc-avatar:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.pc-avatar .pg-avatar { display: block; }
.pc-id { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; padding-bottom: 2px; }
.pc-name { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #9fe0b6; }
.pc-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #6fd39b; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pc-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; font-size: 12.5px; font-weight: 600; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--soft); }
.pc-tag-title { color: #e8d6b4; background: rgba(242, 180, 92, 0.1); }
.pc-jeton { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; margin-bottom: 4px; padding: 6px 12px 6px 8px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; border-radius: 999px; background: rgba(242, 180, 92, 0.1); color: #f6d9a8; }

.pc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; padding: 20px; }
.pc-grid > .pc-block:first-child { grid-column: 1 / -1; }
.pc-block { min-width: 0; }
.pc-h { margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: var(--soft); letter-spacing: 0; }
.pc-ranks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.pc-rank { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid transparent; }
.pc-rank.is-best { border-color: rgba(242, 180, 92, 0.4); }
.pc-rank.is-unranked .pg-rank-emblem { filter: grayscale(1); opacity: 0.4; }
.pc-rank-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pc-rank-game { font-size: 12.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-rank-tier { font-size: 15px; font-weight: 600; }
.pc-rank.is-unranked .pc-rank-tier { font-weight: 500; color: var(--soft); }
.pc-rank-pts { font-size: 12.5px; color: #8a90a8; font-variant-numeric: tabular-nums; }
.pc-rank-best { position: absolute; top: 8px; right: 10px; font-size: 11.5px; font-weight: 600; color: var(--lamp); }

.pc-showcase { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pc-show { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; min-width: 0; }
.pc-show > :first-child { grid-row: 1 / 3; }
.pc-show-art { position: relative; display: block; width: 44px; height: 44px; overflow: hidden; border-radius: 12px; background: #0b0e1c; }
.pc-show-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pc-show-emblem, .pc-show-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); }
.pc-show-num { font-size: 16px; font-weight: 700; color: var(--sage); font-variant-numeric: tabular-nums; }
.pc-show-label { font-size: 12.5px; color: var(--soft); }
.pc-show-value { font-size: 15px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pc-matches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pc-match { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 0; font-size: 14px; }
.pc-match-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: #6b7190; }
.r-win .pc-match-dot { background: #6fd39b; }
.r-loss .pc-match-dot { background: #e0848c; }
.pc-match-main { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.pc-match-res { font-weight: 600; }
.pc-match-what { font-size: 12.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-match-delta { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pc-match-delta.up { color: #9fe0b6; }
.pc-match-delta.down { color: #e8a0a7; }
.pc-match-when { flex-shrink: 0; font-size: 12px; color: #8a90a8; }
.pc-empty { margin: 0; font-size: 14px; line-height: 1.5; color: var(--soft); }

.pc-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.pc-link { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px 0 11px; font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); transition: background-color 0.15s, border-color 0.15s; }
.pc-link:hover { background: #242b46; border-color: var(--line-strong); }
.pc-link:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.pc-ic { display: grid; place-items: center; color: var(--soft); }

.pc-guest-body { display: flex; gap: 18px; padding: 22px 20px 20px; }
.pc-ghost-avatar { display: grid; place-items: center; flex-shrink: 0; width: 72px; height: 72px; border-radius: 50%; color: var(--soft); background: var(--surface-2); border: 1px dashed var(--line-strong); }
.pc-guest-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pc-guest-title { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.pc-guest-text p { margin: 0; max-width: 52ch; font-size: 14.5px; line-height: 1.55; color: var(--soft); }
.pc-guest-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Friends: In game (green), Online (blue), Offline (grey) */
.fl { --in-game: #8fd6a0; --on: #86b8ff; --off: #6b7190; padding: 16px 12px 12px; }
.fl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 8px 6px; }
.fl-title { margin: 0; font-size: 17px; color: var(--text); }
.fl-all { min-height: 32px; padding: 0 12px; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--soft); background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.fl-all:hover { color: var(--text); border-color: var(--line-strong); }
.fl-req { display: flex; align-items: center; gap: 10px; width: 100%; margin: 6px 0 4px; padding: 9px 10px; font: inherit; font-size: 14px; text-align: left; color: var(--text); background: rgba(242, 180, 92, 0.08); border: 1px solid rgba(242, 180, 92, 0.25); border-radius: 12px; cursor: pointer; }
.fl-req-n { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; font-size: 12.5px; font-weight: 700; color: var(--lamp-ink); background: var(--lamp); border-radius: 999px; }
.fl-group { margin-top: 10px; }
.fl-group-h { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; padding: 0 8px; font-size: 12.5px; font-weight: 600; color: var(--soft); }
.fl-g-game .fl-group-h { color: var(--in-game); }
.fl-g-online .fl-group-h { color: var(--on); }
.fl-count { font-weight: 500; color: #8a90a8; font-variant-numeric: tabular-nums; }
.fl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fl-row { display: flex; align-items: center; gap: 11px; min-width: 0; min-height: 54px; padding: 7px 8px; border-radius: 12px; }
.fl-row:hover { background: rgba(255, 255, 255, 0.03); }
.fl-av { position: relative; flex-shrink: 0; }
.fl-av .pg-avatar { display: block; }
.fl-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--off); border: 2.5px solid var(--surface); }
.fl-game .fl-dot { background: var(--in-game); }
.fl-online .fl-dot { background: var(--on); }
.fl-offline .fl-av { opacity: 0.6; }
.fl-main { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.fl-main .who { max-width: 100%; }
.fl-offline .fl-main .who { opacity: 0.75; }
.fl-status { font-size: 12.5px; color: #8a90a8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-game .fl-status { color: var(--in-game); }
.fl-online .fl-status { color: var(--on); }
.fl-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.fl-btn { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 12px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; }
.fl-dm { padding: 0; width: 34px; color: var(--soft); }
.fl-join { color: #10231a; background: var(--in-game); border-color: var(--in-game); }
.fl-btn:hover { filter: brightness(1.1); }
.fl-btn:focus-visible, .fl-all:focus-visible, .fl-more:focus-visible, .fl-req:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.fl-more { margin: 2px 0 0 8px; padding: 6px 0; font: inherit; font-size: 13.5px; color: var(--soft); background: none; border: 0; cursor: pointer; }
.fl-more:hover { color: var(--text); }
.fl-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 8px 8px 6px; }
.fl-empty p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--soft); }
.fl-skel { margin: 3px 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)); }

/* FAQ and guide teaser */
.hub-faq { padding-top: 40px; }
.faq { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.faq-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 4px; font-size: 16px; font-weight: 500; cursor: pointer; list-style: none; border-radius: 8px; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { color: #fff; }
.faq-q:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.faq-chev { flex-shrink: 0; width: 10px; height: 10px; border-right: 2px solid var(--soft); border-bottom: 2px solid var(--soft); transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.18s var(--ease-out); }
.faq-item[open] .faq-chev { transform: rotate(225deg) translate(-2px, -2px); }
.faq-a { padding: 0 4px 18px; font-size: 15px; line-height: 1.6; color: var(--soft); max-width: 68ch; }
.faq-a p { margin: 0; }
.faq-ladder { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 12px 0 0; padding: 0; }
.faq-ladder li { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text); }
.faq-all { align-self: flex-start; margin-top: 14px; font-size: 14.5px; color: var(--lamp); text-decoration: none; }
.faq-all:hover { text-decoration: underline; }
.faq-guide { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
.faq-guide-title { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.faq-guide p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.55; color: var(--soft); }
.faq-guide-btn { text-decoration: none; }

/* Chrome placement on the hub: chat pill bottom left, docks bottom right, a band behind the top bar once scrolled. */
.hub-page .gchat.collapsed { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); }
.hub-page .gchat { background: rgba(21, 26, 44, 0.9); border-color: var(--line-strong); }
.hub-page::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: calc(var(--top) + max(54px, var(--account-h, 38px) + 18px));
  z-index: 1;
  pointer-events: none;
  background: rgba(14, 17, 32, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.2s;
}
.hub-page.hub-scrolled::before { opacity: 1; }
.hub-page #ui { z-index: 2; }
@media (min-width: 521px) {
  .hub-page .pwa-chip { left: auto; right: max(16px, env(safe-area-inset-right)); top: calc(var(--top) + 60px); }
}

@media (max-width: 520px) {
  .hub-page .pwa-chip { top: calc(var(--top) + 54px); bottom: auto; left: max(16px, env(safe-area-inset-left)); right: auto; }
}

@media (max-width: 720px) {
  .hub-backdrop { opacity: 0.42; }
  .hub-root { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .hub-mark-name { display: none; }
  .hub-shade {
    background:
      linear-gradient(180deg, rgba(14, 17, 32, 0.55) 0%, rgba(14, 17, 32, 0.78) 40%, rgba(14, 17, 32, 0.95) 70%, var(--ink) 100%);
  }
  .hub-hero { padding: 64px 0 36px; }
  .hub-hello { margin-top: 16px; }
  .hub-hero-row { gap: 14px 18px; margin-top: 24px; }
  .hub-games { grid-template-columns: 1fr; gap: 14px; }
  .hub-soon { grid-template-columns: 1fr; gap: 10px; }
  .soon-card { display: grid; grid-template-columns: 112px 1fr; }
  .soon-card .gc-preview { aspect-ratio: auto; height: 100%; min-height: 112px; }
  .soon-body { padding: 12px 14px 14px; }
  .hub-section { padding-top: 20px; }
}

@media (max-width: 980px) {
  .hub-you-grid, .faq { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .pc-jeton { position: absolute; top: 12px; right: 12px; margin: 0; background: rgba(14, 17, 32, 0.55); }
  .pc-ranks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .pc-rank { flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; text-align: center; }
  .pc-rank-text { align-items: center; }
  .pc-rank-game { white-space: normal; line-height: 1.2; }
  .pc-rank-tier { font-size: 14px; }
  .pc-rank-best { position: static; order: -1; margin-bottom: -2px; }
  .pc-head { flex-wrap: wrap; gap: 10px 14px; padding: 0 16px; }
  .pc-avatar .pg-avatar { --av: 72px !important; }
  .pc-id { flex-basis: calc(100% - 100px); }
  .pc-grid { grid-template-columns: 1fr; padding: 16px; }
  .pc-links { padding: 12px 16px 16px; }
  .pc-guest-body { flex-direction: column; gap: 12px; padding: 18px 16px 16px; }
  .fl { padding: 14px 8px 10px; }
}

/* Phones held sideways get the same bottom bar as portrait: chat pill left, the dock in one row right. */
@media (max-height: 500px) and (min-width: 721px) {
  .hub-page {
    --bar-pad: max(6px, env(safe-area-inset-bottom));
    --bar-h: 54px;
    --bar-top: calc(var(--bar-pad) + var(--bar-h));
  }
  .hub-page .shell-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--bar-top);
    z-index: 2;
    pointer-events: none;
    background: rgba(14, 17, 32, 0.86);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .hub-page .shell-dock-right { flex-direction: row-reverse; align-items: center; gap: 8px; bottom: var(--bar-pad); height: var(--bar-h); }
  .hub-page .shell-dock-left { bottom: calc(var(--bar-top) + 10px); }
  .hub-page .gchat.collapsed { bottom: calc(var(--bar-pad) + 6px); }
  .hub-page .pwa-chip { top: auto; bottom: calc(var(--bar-top) + 10px); }
  .hub-hero { padding: 40px 0 28px; }
  .hub-brand { font-size: 52px; }
  .hub-hello { margin-top: 12px; }
  .hub-hero-row { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .game-card, .hub-cta, .gc-play, .soon-btn, .pc-link, .gc-video, .faq-chev, .hub-shade::after, .hub-mark-name { transition: none; }
  .game-card.is-active .art-float, .game-card.is-active .art-drop, .game-card.is-active .art-line { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .hub-page::before { background: var(--ink); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
