/* 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: #242426;
  --category-ink: #fff6de;
  --category-selected: #44403a;
  --category-line: #736b5d;
}
.category-menu {
  gap: 5px;
  padding: 10px;
}
.category-menu a {
  border: 1px solid var(--category-line);
  border-left: 5px solid #b6a078;
  border-radius: 2px;
}
.category-menu .category-number {
  color: #eee0bd;
}
.category-dialog .dialog-panel {
  border-radius: 2px;
}

body > header:first-of-type {
  gap: 8px;
}
body > header:first-of-type nav {
  flex-wrap: nowrap;
  gap: 8px;
}

/* A persistent position marker, with no size or weight change on selection. */
body > header a[data-current-page="true"],
nav:not(.category-menu) a[data-current-page="true"],
body > footer a[data-current-page="true"] {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: currentColor;
}
body > header a[data-current-page="true"]:focus-visible,
nav a[data-current-page="true"]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
@media (max-width: 359px) {
  body > header:first-of-type {
    padding-inline: 8px;
    gap: 5px;
  }
  body > header:first-of-type > a:first-child {
    font-size: 16px !important;
  }
  body > header:first-of-type nav {
    gap: 5px;
  }
  body > header:first-of-type nav a {
    font-size: 12px;
  }
}

/* Two local article excerpts make the reading entrance useful at a glance. */
body[data-design-site="Game74"] .reading-home .reading-summary {
  display: block;
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.5;
}
body[data-design-site="Game74"] .reading-home .reading-card {
  align-items: start;
}

.discovery-trigger[data-current-section] {
  background: var(--category-selected);
  box-shadow: inset 0 -2px 0 currentColor;
}

/* 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;
}

/* A finite directory opens with complete original excerpts; More keeps the same list. */
body[data-design-site="Game74"] .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;
}

/* 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);
}
