.catalog-page {
  --catalog-accent: #925774;
  display: block;
  padding-bottom: 4px;
}
.game-page .catalog-page {
  --catalog-accent: #c5546f;
}
.learn-page .catalog-page {
  --catalog-accent: #438a78;
}
.catalog-stage {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 5px 1px;
}
.catalog-stage.catalog-game-themes {
  grid-template-columns: max-content minmax(0, 1fr);
}
.catalog-game-themes > h2 {
  white-space: nowrap;
}
.catalog-filters {
  grid-template-columns: max-content minmax(0, 1fr) max-content;
}
.catalog-stage h2,
.catalog-results-heading h2,
.catalog-results-heading p {
  margin: 0;
}
.catalog-stage > h2,
.catalog-results-heading h2 {
  color: #172e56;
  font-size: 14px;
  line-height: 1.3;
}
.catalog-chip-row {
  display: flex;
  min-width: 0;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 1px 4px;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.catalog-chip-row[data-expanded="true"] {
  flex-wrap: wrap;
  overflow: visible;
}
.catalog-chip-row::-webkit-scrollbar {
  display: none;
}
.catalog-chip,
.catalog-theme,
.catalog-pagination button,
.catalog-sidebar-toggle,
.catalog-filter-toggle {
  min-height: 38px;
  border: 1px solid #e1dfe8;
  border-radius: 10px;
  background: #fff;
  color: #263b5b;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.catalog-filter-toggle {
  min-height: 34px;
  padding: 0 8px;
  color: #49627f;
  font-size: 10px;
  white-space: nowrap;
}
.catalog-chip {
  flex: 0 0 auto;
  padding: 0 11px;
  white-space: nowrap;
  font-size: 12px;
}
.catalog-chip[aria-pressed="true"],
.catalog-theme[aria-pressed="true"] {
  border-color: var(--catalog-accent);
  background: var(--catalog-accent);
  color: #fff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--catalog-accent) 24%, transparent);
}
.catalog-theme-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.catalog-theme-grid:empty {
  display: none;
}
.catalog-theme {
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 7px;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}
.catalog-theme[hidden] {
  display: none;
}
.catalog-theme > span:not(.catalog-theme-icon) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.catalog-theme small {
  flex: 0 0 auto;
  font-size: 9px;
  opacity: 0.8;
}
.catalog-theme img {
  width: 40px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 4px;
  object-fit: cover;
}
.catalog-theme-icon {
  font-size: 17px;
}
.catalog-results {
  display: block;
}
.catalog-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  margin: 4px 0 7px;
}
.catalog-results-heading p {
  color: #6a7d99;
  font-size: 11px;
}
.catalog-item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.catalog-item[hidden] {
  display: none;
}
.catalog-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e8edf5;
  border-radius: 12px;
  background: #fff;
  color: #1c3155;
  box-shadow: 0 2px 9px #102b3909;
}
.catalog-item-link {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}
.catalog-item-image {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  background: #152743;
  color: #fff;
}
.catalog-item-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalog-placeholder {
  font-size: 24px;
}
.catalog-item-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 8px 9px 5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.catalog-item-copy strong {
  font-size: 12px;
}
.catalog-item-copy small {
  color: #7a8299;
  font-size: 10px;
}
.catalog-item-copy > span {
  color: #5e6d85;
  font-size: 10px;
}
.catalog-item-arrow {
  align-self: flex-end;
  padding: 0 8px 5px;
  color: #73809a;
}
.catalog-attachments {
  margin: 0 8px 8px;
  border-top: 1px solid #e8edf5;
  color: #4b627d;
  font-size: 11px;
}
.catalog-attachments summary {
  min-height: 36px;
  padding: 9px 2px 3px;
  cursor: pointer;
}
.catalog-attachments ul {
  margin: 0;
  padding: 0 0 6px 18px;
}
.catalog-attachments a {
  color: #366da8;
}
.catalog-empty {
  grid-column: 1 / -1;
  margin: 8px 0;
  color: #71809a;
  font-size: 12px;
  line-height: 1.6;
}
.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
  color: #536889;
  font-size: 12px;
}
.catalog-pagination[hidden] {
  display: none;
}
.catalog-pagination button {
  min-width: 80px;
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
}
.catalog-pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}
.catalog-sidebar-toggle {
  position: fixed;
  z-index: 6;
  right: max(0px, env(safe-area-inset-right));
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  display: grid;
  width: 36px;
  height: 92px;
  min-height: 44px;
  place-items: center;
  padding: 6px 4px;
  border-color: #fff;
  border-radius: 12px 0 0 12px;
  background: #183e68ed;
  color: #fff;
  box-shadow: 0 4px 15px #061b3b40;
  font-size: 11px;
  font-weight: 650;
  writing-mode: vertical-rl;
}
.catalog-sidebar {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: #071a3229;
  overscroll-behavior: contain;
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}
.catalog-sidebar[hidden] {
  display: none;
}
.catalog-sidebar-sheet {
  width: clamp(155px, 44vw, 300px);
  height: min(72dvh, 620px);
  max-height: calc(
    100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 20px
  );
  overflow-y: auto;
  padding: 10px;
  border-radius: 16px 0 0 16px;
  background: #f8f9ff;
  color: #203454;
  box-shadow: -7px 0 24px #061b3b35;
  -webkit-overflow-scrolling: touch;
}
.catalog-sidebar-sheet > header {
  position: sticky;
  z-index: 1;
  top: -10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin: -10px -10px 10px;
  padding: 8px 8px 6px 10px;
  border-bottom: 1px solid #e4e9f2;
  background: #f8f9fff2;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.catalog-sidebar-sheet h2 {
  margin: 0;
  font-size: 13px;
}
.catalog-sidebar-sheet > header button {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #e9edf5;
  color: #253958;
  font-size: 22px;
  cursor: pointer;
}
.catalog-sidebar-sheet section + section {
  margin-top: 12px;
}
.catalog-sidebar-sheet h3 {
  margin: 0 0 5px;
  font-size: 12px;
}
.catalog-sidebar-items {
  display: grid;
  gap: 6px;
}
.catalog-sidebar .catalog-item-link {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding: 5px;
}
.catalog-sidebar .catalog-item-image {
  width: 54px;
  border-radius: 6px;
}
.catalog-sidebar .catalog-item-copy {
  padding: 0;
  gap: 2px;
}
.catalog-sidebar .catalog-item-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 10px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.catalog-sidebar .catalog-item-copy small,
.catalog-sidebar .catalog-item-copy > span {
  font-size: 9px;
}
.catalog-sidebar .catalog-item-arrow {
  padding: 0 2px;
}
.catalog-sidebar-open {
  overflow: hidden;
  overscroll-behavior: none;
}
.catalog-page :focus-visible,
.catalog-sidebar :focus-visible {
  outline: 3px solid #3478ee;
  outline-offset: 2px;
}
@media (min-width: 700px) {
  .catalog-stage {
    grid-template-columns: 106px minmax(0, 1fr);
    padding: 7px 4px;
  }
  .catalog-filters {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
  }
  .catalog-stage > h2,
  .catalog-results-heading h2 {
    font-size: 16px;
  }
  .catalog-theme-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 9px;
  }
  .catalog-theme {
    min-height: 56px;
    font-size: 13px;
  }
  .catalog-item-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .catalog-item-copy strong {
    font-size: 14px;
  }
  .catalog-item-copy small,
  .catalog-item-copy > span {
    font-size: 11px;
  }
  .catalog-sidebar-toggle {
    right: 12px;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
  .catalog-sidebar-sheet {
    width: min(380px, 38vw);
    height: 100dvh;
    max-height: 100dvh;
    padding: max(16px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  }
  .catalog-sidebar-sheet > header {
    top: calc(-1 * max(16px, env(safe-area-inset-top)));
    margin: calc(-1 * max(16px, env(safe-area-inset-top))) -16px 16px;
    padding: max(14px, env(safe-area-inset-top)) 16px 10px;
  }
  .catalog-sidebar-sheet h2 {
    font-size: 16px;
  }
  .catalog-sidebar-sheet section + section {
    margin-top: 20px;
  }
  .catalog-sidebar-sheet h3 {
    font-size: 14px;
  }
  .catalog-sidebar .catalog-item-link {
    grid-template-columns: 82px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 8px;
  }
  .catalog-sidebar .catalog-item-copy strong {
    font-size: 13px;
  }
}
@media (max-width: 359px) {
  .catalog-stage {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 5px;
    padding-inline: 0;
  }
  .catalog-filters {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    gap: 4px;
  }
  .catalog-filter-toggle {
    padding-inline: 5px;
    font-size: 9px;
  }
  .catalog-theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .catalog-item-grid {
    gap: 6px;
  }
  .catalog-item-copy {
    padding-inline: 6px;
  }
  .catalog-item-copy strong {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-sidebar,
  .catalog-chip,
  .catalog-theme {
    scroll-behavior: auto;
    transition: none;
  }
}
