/* The Game Shelf — extends styles.css tokens */

.visually-hidden{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.games-breadcrumb{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 36px var(--gutter) 0;
  font-size: 0.88rem;
}
.games-breadcrumb a{ text-decoration: none; color: var(--navy); font-weight: 600; }
.games-breadcrumb a:hover{ color: var(--navy-deep); text-decoration: underline; }

.games-hero{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px var(--gutter) 8px;
}
.games-hero h1{
  font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 10px;
}
.games-hero-sub{
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 62ch;
  margin: 0;
}

.games-main{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px var(--gutter) 8px;
}

/* Stat tiles — same treatment as the homepage numbers */
.stats{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}
.stat{
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.stat .num{
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.1;
  color: var(--navy);
}
.stat .lbl{
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* Filter pills + search */
.toolbar{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 8px;
}
.seg{
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  background: var(--card);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow);
}
.seg button{
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.seg button:hover{ color: var(--navy); }
.seg button.active{ background: var(--navy); color: #fff; }
.search{
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  border: 1px solid rgba(21,32,43,0.12);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 11px 18px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  box-shadow: var(--shadow);
  outline: none;
}
.search:focus{ border-color: var(--navy); box-shadow: 0 0 0 3px rgba(29,63,114,0.18); }

/* Game cards */
.section-title{
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 28px 0 12px;
}
.grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.game{
  background: var(--card);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.game:hover{ box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.game .top{ display: flex; align-items: center; gap: 12px; }
.icon{
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 24px;
  background: var(--fill);
  flex-shrink: 0;
}
.game h3{ margin: 0; font-size: 1.02rem; font-weight: 700; line-height: 1.3; }
.tag{ font-size: 0.78rem; color: var(--ink-soft); }
.game p{ margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.meta{ display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.pill{
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--navy-tint);
  color: var(--navy);
  padding: 4px 10px;
  border-radius: 999px;
}
.empty{ color: var(--ink-soft); padding: 30px 0; }

.games-disclaimer{
  margin: 36px 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* Rules modal */
.overlay{
  position: fixed;
  inset: 0;
  background: rgba(12,20,32,0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.overlay.open{ display: flex; }
.modal{
  background: var(--card);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow: auto;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-head{
  background: var(--navy);
  color: #fff;
  padding: 26px 64px 22px 26px;
  position: relative;
}
.modal-head h2{ margin: 0 0 4px; font-size: 1.55rem; font-weight: 700; }
.modal-head .tag{ color: #C3D3E8; font-size: 0.9rem; }
.modal-head .meta{ margin-top: 12px; }
.modal-head .meta .pill{ background: rgba(255,255,255,0.14); color: #fff; }
.close{
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.close:hover{ background: rgba(255,255,255,0.28); }
.tabs{ display: flex; gap: 6px; padding: 16px 26px 0; flex-wrap: wrap; }
.tabs button{
  border: 0;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink-soft);
  cursor: pointer;
}
.tabs button:hover{ color: var(--navy); }
.tabs button.active{ background: var(--navy); color: #fff; }
.modal-body{ padding: 18px 26px 28px; font-size: 0.95rem; }
.modal-body .about{ margin: 0; }
.modal-body ol, .modal-body ul{ padding-left: 20px; margin: 0; }
.modal-body li{ margin-bottom: 10px; }
.modal-body li::marker{ color: var(--navy); }
.modal-body li b{ color: var(--navy); }

@media (max-width: 560px){
  .search{ max-width: none; }
  .stats{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat{ padding: 16px; border-radius: var(--radius-md); }
}
