/* Direct category navigation belongs to this site's existing theme. */
.category-dialog {
  --menu-bg: var(--category-surface, #fff);
  --menu-fg: var(--category-ink, #23313b);
  background: transparent;
  color: var(--menu-fg);
  border: 0;
  padding: 0;
  width: min(94vw, 440px);
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 24px);
  overflow: visible;
}
.category-dialog::backdrop {
  background: rgb(10 18 22 / 0.5);
}
.category-dialog .dialog-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100dvh - 24px);
  padding: 0;
  background: var(--menu-bg);
  color: var(--menu-fg);
  border: 1px solid var(--category-line, #bac4c7);
  border-radius: 8px;
  box-shadow: 0 8px 32px #0003;
  overflow: hidden;
}
.category-dialog .dialog-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  flex: none;
  border-bottom: 1px solid var(--category-line, #bac4c7);
}
.category-dialog h2 {
  margin: 0;
  font: inherit;
  font-weight: 600;
  font-size: 18px;
}
.category-dialog button {
  min-width: 44px;
  min-height: 44px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 4px;
}
.category-menu {
  display: grid;
  align-content: start;
  gap: 0;
  margin: 0;
  padding: 8px 12px 12px;
  overflow: auto;
  overscroll-behavior: contain;
  font-size: 16px;
}
.category-menu a {
  display: flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--category-line, #d6dcde);
  border-radius: 0;
  box-sizing: border-box;
}
.category-menu a[aria-current="page"] {
  background: var(--category-selected, #e6ecee);
  font-weight: inherit;
}
.category-menu a:hover {
  background: var(--category-selected, #e6ecee);
}
.category-menu .category-number {
  font-size: 12px;
  opacity: 0.8;
  width: 20px;
  flex: none;
}
.category-menu small {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.85;
}
.category-menu a:focus-visible,
.category-dialog button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -3px;
}
.gpt-lazy[data-ad-empty="true"] {
  display: none !important;
}
body > header:first-of-type {
  min-height: 56px;
  box-sizing: border-box;
}
body > header:first-of-type > a:first-child {
  white-space: nowrap;
  line-height: 1.15;
}
.discovery-trigger {
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 8px !important;
  flex: none;
}
[data-category-nav] a {
  font-size: 16px;
  min-height: 44px;
  font-weight: 400;
}
[data-category-nav] a[aria-current="page"] {
  font-weight: 400;
}
:root {
  --category-surface: #f6f7f8;
  --category-ink: #1b2636;
  --category-selected: #e0e7ee;
  --category-line: #b6c1cc;
}
.category-dialog {
  margin-right: 8px;
}
/* Two local article excerpts make the reading entrance useful at a glance. */
body[data-design-site="Game71"] .reading-home .reading-summary {
  display: block;
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.5;
}
body[data-design-site="Game71"] .reading-home .reading-card {
  align-items: start;
}

/* Quiet ordinary navigation, with a persistent current marker and separate focus. */
body > header a:not([data-current-page="true"]),
body > footer a:not([data-current-page="true"]) {
  text-decoration: none;
}
body > header > a:first-child {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
body > header nav a:not([data-current-page="true"]):hover,
body > footer nav a:not([data-current-page="true"]):hover {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

body > header nav a,
body > footer nav a {
  min-width: 44px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  body[data-design-page="home"] .game-grid [data-image-frame] {
    aspect-ratio: 2.2;
  }
}

/* A finite directory opens with complete original excerpts; More keeps the same list. */
body[data-design-site="Game71"] .reading-directory .reading-summary {
  display: block;
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.5;
}
body[data-design-page="article-index"] .reading-intro > p {
  display: block;
  font-size: 14px;
  line-height: 1.5;
}

@media (min-width: 768px) {
  body[data-design-page="home"] .game-grid .row-completion-art {
    aspect-ratio: 2.2;
  }
  body[data-design-site="Game71"] .reading-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-design-site="Game71"] .reading-directory .reading-art {
    aspect-ratio: 2.2;
  }
}

@media (min-width: 768px) {
  .catalogue-tail {
    margin-bottom: 12px;
  }
  .undo-line {
    margin-block: 0;
  }
  .undo-line p {
    flex-basis: auto;
  }
  .undo-line a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-block: 0;
  }
}

/* The category menu no longer needs the old full-height search drawer. */
dialog.category-dialog[data-filters] {
  height: auto;
  min-height: 0;
  max-height: calc(100dvh - 24px);
  margin-block: auto;
}
dialog.category-dialog[data-filters] .dialog-panel {
  height: auto;
  min-height: 0;
  max-height: calc(100dvh - 24px);
}
