@charset "utf-8";
@import url("./index_style.css");

/* Keep the original site's orange headings, pale-yellow background and
   compact square thumbnails. This file only adapts the new catalog markup. */
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-padding-top: 12px;
}
main {
  width: 100%;
}
section {
  margin: 8px 0 16px;
}
p {
  line-height: 1.6;
}
img {
  max-width: 100%;
}
a:focus-visible,
input:focus-visible,
select:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #994000;
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 8px;
  padding: 8px;
  background: white;
  z-index: 10;
}
.skip-link:focus {
  top: 8px;
}
.site-header .site-name {
  font-size: 20px;
  font-weight: bold;
  margin: 4px 0;
}
.site-header .site-name a {
  color: white;
}
.site-header p {
  margin: 6px 4px;
  font-size: 13px;
}
.site-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0;
  font-size: 14px;
}
.site-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px;
  border: 2px solid #e86620;
  border-radius: 7px;
  background: #fff;
  color: #963900;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
}
.site-nav a:hover,
.section-heading > a:hover {
  background: #fff0d4;
  text-decoration: underline;
}
.section-heading {
  margin: 5px 0;
}
.section-heading:has(> a) {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: #ff6b35;
  border-radius: 8px;
}
.section-heading:has(> a) > h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.section-heading > a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #963900;
  border-radius: 6px;
  background: #fff;
  color: #963900;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  font-size: 13px;
  margin: 0;
}
main h2,
.page-intro h1 {
  background: #ff6b35;
  color: white;
  padding: 5px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  margin: 5px auto;
  text-align: center;
  border: none;
}
.section-note {
  font-size: 13px;
  margin: 6px;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  padding: 8px;
  align-items: start;
}
.game-card {
  min-width: 0;
  background: #faf9f7;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease;
}
.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.game-link {
  display: block;
  text-decoration: none;
}
.game-link > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
}
.card-body {
  padding: 4px;
  text-align: center;
}
.card-body h3 {
  color: #333;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 4px;
}
.card-body p,
.card-tag,
.play-link {
  display: none;
}
#recommendations .card-body h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  height: 2.8em;
}
.promo-columns section {
  margin: 0;
}
.promo-columns {
  margin-top: 5px;
}
.promo-subtitle {
  text-align: center;
}
.promo-columns .game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.promo-columns #daily-recommendation-placeholder {
  display: block;
}
.recommend-newgames-wrapper {
  min-width: 0;
}
.recommend-newgames-wrapper .new-games-section {
  display: block;
}
/* Keep the promotion, but give playable recommendations and rankings the
   first screen. Use three adjacent sections instead of two stacked rows. */
@media (min-width: 1100px) {
  .promo-columns {
    display: grid;
    grid-template-columns: 0.85fr 1fr 1fr;
    gap: 14px;
    align-items: start;
  }
  .promo-columns .recommend-newgames-wrapper {
    display: contents;
  }
  .promo-columns .promo-video-column {
    width: auto;
    min-width: 0;
  }
  .promo-columns .interview-container {
    max-width: 280px;
    margin: 0 auto;
  }
  .promo-columns .interview-fallback-image {
    height: auto;
    object-fit: contain;
  }
  .promo-columns .game-grid {
    gap: 8px;
    padding: 8px 0;
  }
  .promo-columns .card-body h3 {
    font-size: 13px;
  }
  .promo-columns .promo-subtitle {
    margin: 4px 0;
    font-size: 13px;
  }
  .promo-columns h2 {
    font-size: 16px;
  }
}
@media (max-width: 1099px) {
  .promo-columns .interview-container {
    max-width: 360px;
    margin: auto;
  }
}
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  padding: 8px;
  align-items: start;
}
.ranking-card {
  position: relative;
  min-width: 0;
  background: #faf9f7;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
}
.ranking-card a {
  display: block;
  text-decoration: none;
}
.ranking-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
}
.ranking-card h3 {
  color: #333;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin: 4px;
}
.ranking-card p {
  text-align: center;
  font-size: 12px;
  margin: 3px;
}
.rank-badge {
  position: absolute;
  left: 0;
  top: 0;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border-radius: 4px;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.ranking-more {
  text-align: center;
  font-size: 13px;
}
.rank-list {
  padding-left: 32px;
}
.rank-list li {
  margin: 6px 0;
  font-size: 14px;
}
.rank-list small {
  margin-left: 8px;
  color: #555;
}
.genre-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
}
.genre-card {
  padding: 8px;
  background: #fff;
  border: 1px solid #ffd0a0;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
}
.genre-card strong {
  display: block;
  font-size: 14px;
}
.genre-card > span {
  display: none;
}
.genre-card small {
  color: #555;
  font-size: 12px;
}
/* Home is a quick index; the actual game previews immediately follow it. */
.genre-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 4px 6px 4px 12px;
  background: #ff6b35;
  color: white;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  list-style: none;
}
.genre-disclosure > summary::-webkit-details-marker {
  display: none;
}
.genre-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-left: 8px;
  padding: 6px 10px;
  border: 1px solid #963900;
  border-radius: 6px;
  background: white;
  color: #963900;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}
.genre-close-label,
.genre-disclosure[open] .genre-open-label {
  display: none;
}
.genre-disclosure[open] .genre-close-label {
  display: inline;
}
.genre-disclosure > summary:hover .genre-toggle {
  background: #fff0d4;
}
#genres .genre-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0;
}
#genres .genre-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  max-width: 100%;
  padding: 6px 10px;
  color: #963900;
  border-color: #e86620;
}
#genres .genre-card strong {
  font-size: 13px;
}
#genres .genre-card small {
  white-space: nowrap;
}
#genres .genre-card:hover {
  background: #fff0d4;
  text-decoration: underline;
}
.page-intro {
  margin: 8px 0 16px;
}
.page-intro p {
  margin: 8px;
}
.breadcrumbs {
  font-size: 12px;
  margin: 8px;
  overflow-wrap: anywhere;
}
.catalog-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  background: white;
}
.catalog-controls label {
  font-size: 13px;
}
.catalog-controls input,
.catalog-controls select {
  max-width: 100%;
  min-width: 0;
  padding: 7px;
  border: 1px solid #aaa;
  border-radius: 4px;
  font: inherit;
}
.catalog-controls button {
  padding: 6px;
  cursor: pointer;
}
.catalog-controls p {
  margin: 0;
}
.update-container p {
  margin: 8px 0;
}
.update-container img {
  max-width: 100px;
  vertical-align: middle;
}
.archive {
  height: auto;
  overflow: visible;
}
.community,
.related-sites {
  background: #fff;
}
.community iframe {
  width: 100%;
  border: 0;
}
.community p,
.related-sites p {
  padding: 0 6px;
}
.related-sites li {
  margin: 4px;
}
.faq details {
  padding: 8px;
  border-bottom: 1px solid #ddd;
}
.faq summary {
  cursor: pointer;
  font-weight: bold;
}
.faq p {
  margin: 8px 0;
}
.ad-slot {
  text-align: center;
  margin: 12px 0;
}
.ad-slot .eyebrow {
  font-size: 11px;
  color: #666;
}
footer {
  margin-top: 16px;
  background: white;
  padding: 12px 6px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
}
.footer-brand {
  font-weight: bold;
}
.home-category-previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  align-items: start;
}
.home-category-previews > section {
  min-width: 0;
  margin: 0;
}
.home-category-previews .game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .home-category-previews {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 1400px) {
  .game-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 1200px) {
  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1099px) {
  .promo-columns .game-grid {
    max-width: 650px;
    margin: auto;
  }
  .ranking-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .game-grid,
  .ranking-grid,
  .promo-columns .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 3px;
  }
  .card-body h3,
  .ranking-card h3 {
    font-size: 12px;
  }
  .rank-badge {
    font-size: 11px;
    padding: 3px 5px;
  }
  main h2 {
    font-size: 16px;
  }
  .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .genre-card strong {
    font-size: 12px;
  }
  .site-header h1 {
    font-size: 17px;
  }
  .site-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    font-size: 12px;
  }
  .section-note {
    font-size: 12px;
  }
  .catalog-controls {
    align-items: stretch;
    flex-direction: column;
  }
}
@media (max-width: 400px) {
  .card-body h3,
  .ranking-card h3 {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .game-card {
    transition: none;
  }
}
