.hub-card-size {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1440px;
  margin: -12px auto 20px;
  color: #425558;
  font-size: 14px;
}
.hub-game-details { position: fixed; z-index: 160; width: min(340px, calc(100vw - 24px)); max-height: min(400px, calc(100dvh - 24px)); overflow-y: auto; padding: 22px; border: 1px solid #c8d8d5; border-radius: 8px; box-shadow: 0 12px 36px #203a3a2b; background: #fff; color: #294541; animation: hub-details-in 130ms ease-out; }
.hub-game-details[hidden] { display: none; }
.hub-game-details h3 { font-size: 19px; line-height: 1.4; color: #294541; padding-right: 28px; margin: 0 0 12px; overflow-wrap: anywhere; }
.hub-game-details p { font-size: 14px; line-height: 1.8; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.hub-detail-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; padding: 0; border: 1px solid #d7e1df; border-radius: 5px; background: #f5f9f8; color: #526d68; font-size: 22px; cursor: pointer; }
@keyframes hub-details-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media(prefers-reduced-motion:reduce) { .hub-game-details { animation: none; } }
.hub-card-size input { width: 160px; min-width: 80px; accent-color: #167b79; cursor: pointer; }
.hub-card-size output { width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.hub-card-size button { width: 32px; height: 32px; padding: 0; background: #fff; color: #425558; border: 1px solid #bdc9c7; border-radius: 4px; font-size: 21px; }
#gameLibrary { grid-template-columns: repeat(auto-fill, minmax(0, var(--hub-card-width, 30%))); justify-content: center; align-items: start; }
#gameLibrary .game-tile h2 { overflow-wrap: anywhere; }
#gameLibrary.compact-cards .game-tile-body { padding: 8px; gap: 10px; min-height: 0; }
#gameLibrary.compact-cards .game-type { overflow-wrap: anywhere; }
#gameLibrary.compact-cards .game-tile-body > div > p:last-child { overflow-wrap: anywhere; }
#gameLibrary.compact-cards .game-enter { padding: 8px 2px; overflow-wrap: anywhere; }
.hub-card-layout { display: flex; }
.hub-card-layout button { width: auto; padding: 0 12px; font-size: 14px; border-radius: 0; }
.hub-card-layout button:first-child { border-radius: 4px 0 0 4px; }
.hub-card-layout button:last-child { border-radius: 0 4px 4px 0; }
.hub-card-layout button[aria-pressed="true"] { color: #fff; background: #167b79; border-color: #167b79; }
#gameLibrary .game-tile-body { min-height: 0; grid-template-rows: auto auto auto; gap: 10px; }
#gameLibrary .game-tile-body > div > p:last-child { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.hub-description-toggle { justify-self: end; width: 32px; height: 28px; padding: 0; border: 1px solid #bdc9c7; border-radius: 4px; color: #425558; background: #f3f7f6; font-size: 20px; line-height: 1; }
#gameLibrary.landscape-cards .game-tile { display: grid; grid-template-columns: minmax(72px, 34%) minmax(0, 1fr); }
#gameLibrary.landscape-cards .game-cover-stage { align-self: start; border-bottom: 0; }
#gameLibrary.landscape-cards .game-tile-body { padding: 12px; }
#gameLibrary.landscape-cards .game-tile h2 { font-size: 20px; }
@media (hover: hover) and (pointer: fine) {
  #gameLibrary .game-tile:hover { box-shadow: 0 10px 28px #183b3b26; }
}
#gameLibrary .game-tile h2 { font-size: max(12px, calc(27px * var(--hub-text-scale, 1))); }
#gameLibrary .game-type { font-size: max(9px, calc(13px * var(--hub-text-scale, 1))); }
#gameLibrary .game-tile-body > div > p:last-child { font-size: max(10px, calc(16px * var(--hub-text-scale, 1))); }
#gameLibrary .game-enter { font-size: max(10px, calc(16px * var(--hub-text-scale, 1))); }
#gameLibrary.landscape-cards .game-tile h2 { font-size: max(12px, calc(20px * var(--hub-text-scale, 1))); }
@media (max-width: 760px) {
  #gameLibrary .game-tile h2 { font-size: max(12px, calc(19px * var(--hub-text-scale, 1))); }
  #gameLibrary .game-type { font-size: max(9px, calc(11px * var(--hub-text-scale, 1))); }
  #gameLibrary .game-tile-body > div > p:last-child,
  #gameLibrary .game-enter { font-size: max(10px, calc(12px * var(--hub-text-scale, 1))); }
}
@media (max-width: 760px) {
  .hub-card-size { justify-content: flex-start; flex-wrap: nowrap; gap: 6px; margin: 0 auto 12px; }
  .hub-card-size label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .hub-card-size input { flex: 1; min-width: 40px; width: 80px; max-width: 220px; }
  .hub-card-size output { width: 38px; flex: 0 0 38px; font-size: 12px; }
  .hub-card-size button { flex-shrink: 0; }
  .hub-card-layout button { padding: 0 8px; font-size: 12px; }
}
