@import url("./base.css?v=53f6d85f9e5c");
:root {
  --accent: #315e91;
  --ink: #293039;
  --muted: #596675;
  --line: #dce3ea;
  --wash: #f3f6f9;
}
.quick-head,
main,
.site-footer,
.announcement {
  width: min(100%, 1160px);
  margin-inline: auto;
  padding-inline: 16px;
}
.quick-head {
  display: flex;
  flex-wrap: wrap;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  padding-top: 4px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  text-decoration: none;
  font-size: 15px;
  white-space: normal;
  flex: 1 1 auto;
}
.brand > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand strong {
  font-size: 19px;
  letter-spacing: -0.6px;
}
.brand-mark {
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
  width: 28px;
  text-align: center;
}
.discovery-open {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--wash);
  border: 0;
  white-space: nowrap;
  font-size: 14px;
  padding-inline: 10px;
}
.primary-nav {
  flex: 1 0 100%;
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-top: 0;
}
.primary-nav::-webkit-scrollbar {
  display: none;
}
.primary-nav a {
  flex: 0 0 auto;
  min-height: 44px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
  font-size: 14px;
}
.primary-nav a[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
  color: var(--accent);
}
main {
  padding-top: 10px;
}
.section-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  min-width: 0;
}
.section-line h1,
.section-line h2 {
  font-size: 18px;
  font-weight: 650;
  margin: 0;
}
.section-line > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  min-height: 44px;
  font-size: 14px;
  color: var(--accent);
  white-space: nowrap;
}
.section-line > a svg {
  transform: rotate(180deg);
  width: 16px;
}
.result-summary {
  font-size: 14px;
  color: var(--muted);
}
.shortcut-grid,
.quick-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
}
.quick-card {
  min-width: 0;
}
.game-link {
  display: block;
  min-width: 0;
  text-decoration: none;
  border-radius: 5px;
}
.game-link:hover {
  background: var(--wash);
}
.shortcut-grid .game-picture,
.quick-directory .game-picture {
  aspect-ratio: 4/3;
  border-radius: 5px;
}
.card-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 0;
  min-width: 0;
}
.card-copy h2 {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  min-width: 0;
  flex: 1;
}
.key-tab {
  font:
    11px/1.4 ui-monospace,
    monospace;
  padding: 1px 5px;
  border: 1px solid #c9d3dd;
  border-radius: 3px;
  color: var(--muted);
  flex: none;
}
.pick-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}
.more {
  border-color: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding-inline: 0;
}
.key-settings summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}
.key-settings summary:after {
  content: "⌄";
  margin-left: 8px;
}
.key-settings[open] {
  max-width: 65%;
}
.key-settings p {
  font-size: 14px;
}
.key-settings button {
  font-size: 14px;
}
.different-route,
.reading-notes,
.support-games {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.compact-games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
}
.compact-games .game-link {
  display: flex;
  gap: 10px;
  align-items: center;
}
.compact-games .game-picture {
  width: 64px;
  height: 76px;
  flex: none;
  border-radius: 4px;
}
.compact-games .card-copy {
  display: block;
  padding: 0;
  min-width: 0;
}
.compact-games h2 {
  font-size: 14px;
}
.compact-games .key-tab {
  display: none;
}
.article-list > li + li {
  border-top: 1px solid var(--line);
}
.article-list a {
  display: block;
  min-height: 44px;
  text-decoration: none;
  padding: 10px 0;
}
.article-list h2 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 3px;
}
.article-list p {
  margin: 0;
  line-height: 1.5;
  font-size: 14px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-list a:hover h2 {
  color: var(--accent);
}
.site-footer {
  margin-top: 22px;
  padding-block: 14px 24px;
  border-top: 1px solid var(--line);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 22px;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  text-decoration: none;
  color: var(--muted);
}
.category-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(22 35 49 / 35%);
  animation: shade-in 180ms ease-out;
}
.category-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 70vw;
  max-width: none;
  min-width: 0;
  height: 100%;
  height: 100dvh;
  margin: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px #172b4012;
  animation: panel-in 180ms ease-out;
  color: var(--ink);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 68px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.panel-head h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}
.panel-head button {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 0;
  padding: 8px 0;
  font-size: 14px;
  min-width: 56px;
}
.panel-head button span {
  font-size: 22px;
  line-height: 1;
}
.category-links {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 16px;
  flex: 1;
  align-content: start;
}
.category-links > a {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  border-bottom: 1px solid #eaf0f5;
  font-size: 16px;
}
.category-links > a > svg {
  color: #67798a;
  flex: none;
}
.category-links > a > span:not(.entry-arrow) {
  flex: 1;
}
.category-links > a[aria-current] {
  color: var(--accent);
  font-weight: 600;
}
.category-links > a[aria-current] > span:not(.entry-arrow) {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.entry-arrow {
  font-size: 16px;
  color: #8c9caa;
  flex: none;
}
.category-links > a:hover {
  background: var(--wash);
}
.panel-help {
  padding: 10px 16px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.panel-help a {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 14px;
  text-decoration: none;
  color: var(--muted);
}
@keyframes panel-in {
  from {
    transform: translateX(24px);
    opacity: 0.7;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes shade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.detail-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 44px;
  margin: 0 0 8px;
}
.detail-bar > a {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.detail-bar h1 {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  margin: 0;
}
.detail-bar button {
  width: 44px;
  min-width: 44px;
  border: 0;
  padding: 0;
}
.player-stage {
  max-width: 900px;
  margin: 0 auto;
}
.player-media {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--wash);
  border-radius: 5px;
  overflow: hidden;
}
.player-media > .game-picture {
  width: 100%;
  height: 100%;
}
.player-media > button {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: var(--accent);
  min-width: 110px;
  box-shadow: 0 2px 12px #0003;
}
.player-media > iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.player-tools {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.player-tools button {
  font-size: 14px;
}
.player-stage > [role="status"] {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
.player-stage:fullscreen {
  background: #fff;
  overflow: auto;
  padding: 16px;
}
.player-stage:fullscreen .player-media {
  height: calc(100vh - 140px);
  aspect-ratio: auto;
}
.prose,
.reading-page {
  max-width: 72ch;
  margin-inline: auto;
  font-size: 16px;
  line-height: 1.65;
}
.prose h1 {
  font-size: 22px;
  margin-bottom: 20px;
}
.prose h2,
.article-section h2,
.source-note h2 {
  font-size: 18px;
  margin: 22px 0 8px;
}
.prose p,
.article-section p {
  margin: 8px 0 18px;
}
.category-back,
.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}
.source-note {
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.source-note a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.source-list section {
  border: 0;
}
.article-title h1 {
  font-size: 15px;
}
.article-summary {
  font-size: 17px;
  color: var(--muted);
  margin: 16px 0 24px;
}
.article-section ul {
  list-style: disc;
  padding-left: 22px;
}
.plain-index a {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.support-games .compact-games .game-picture {
  height: 90px;
}
.gpt-lazy {
  max-width: calc(100% - 24px);
}
.gpt-lazy:empty {
  display: none !important;
}
.gpt-lazy[data-ad-status="unfilled"] {
  display: none !important;
}
.module-ad-boundary:empty {
  display: none;
}
@media (min-width: 760px) {
  .quick-head {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) auto;
    min-height: 64px;
    padding-block: 10px;
  }
  .brand {
    font-size: 14px;
  }
  .brand strong {
    font-size: 22px;
  }
  .brand-mark {
    font-size: 34px;
    width: 32px;
  }
  .discovery-open {
    grid-column: 3;
    grid-row: 1;
  }
  .primary-nav {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    gap: 30px;
  }
  .primary-nav a {
    font-size: 15px;
  }
  .shortcut-grid,
  .quick-directory {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }
  .card-copy h2 {
    font-size: 15px;
  }
  .compact-games {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 28px;
  }
  .compact-games .game-picture {
    width: 112px;
    height: 92px;
  }
  .compact-games h2 {
    font-size: 16px;
  }
  .support-games .compact-games .game-picture {
    width: 144px;
    height: 112px;
  }
  .support-games .compact-games {
    row-gap: 18px;
  }
  .article-list a {
    padding: 10px 0;
  }
  .article-list h2 {
    font-size: 16px;
  }
  .article-list p {
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
  }
  .panel-head,
  .category-links,
  .panel-help {
    padding-inline: 28px;
  }
  .category-links {
    display: block;
  }
  .category-links > a {
    max-width: 620px;
  }
  .panel-head h2 {
    font-size: 20px;
  }
  .category-panel {
    padding-bottom: 10px;
  }
  .category-links > a {
    min-height: 50px;
  }
  .section-line h1,
  .section-line h2 {
    font-size: 20px;
  }
}
@media (max-width: 350px) {
  .quick-head,
  main,
  .site-footer {
    padding-inline: 12px;
  }
  .brand {
    gap: 5px;
  }
  .brand strong {
    font-size: 17px;
  }
  .brand-mark {
    width: 22px;
    font-size: 24px;
  }
  .discovery-open {
    font-size: 13px;
    gap: 6px;
    padding-inline: 8px;
  }
  .primary-nav {
    gap: 20px;
  }
  .panel-head,
  .category-links,
  .panel-help {
    padding-inline: 12px;
  }
  .panel-head h2 {
    font-size: 16px;
  }
  .panel-head {
    gap: 6px;
  }
  .compact-games .game-picture {
    width: 54px;
  }
  .compact-games .game-link {
    gap: 8px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .quick-head {
    display: grid;
    grid-template-columns: 240px 1fr auto;
    padding-block: 5px;
    min-height: 56px;
  }
  .primary-nav {
    grid-column: 2;
    grid-row: 1;
  }
  .discovery-open {
    grid-column: 3;
    grid-row: 1;
  }
  .shortcut-grid,
  .quick-directory {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .category-panel {
    height: 100dvh;
  }
  .panel-head {
    min-height: 56px;
    padding-block: 6px;
  }
  .panel-help {
    padding-block: 4px;
  }
}

.category-layer {
  width: 100vw;
  right: auto;
}
/* Keep Close fully inside the content viewport, including its focus ring. */
.category-layer {
  width: auto;
  right: 0;
}
.panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}
.panel-head h2 {
  min-width: 0;
}
.panel-head button {
  white-space: nowrap;
  justify-content: center;
}

.category-layer.is-closing {
  animation: shade-out 180ms ease-in both;
  pointer-events: none;
}
.category-layer.is-closing .category-panel {
  animation: panel-out 180ms ease-in both;
}
@keyframes shade-out {
  to {
    opacity: 0;
  }
}
@keyframes panel-out {
  to {
    transform: translateX(24px);
    opacity: 0.7;
  }
}
/* Keep the same compact content rhythm before and after every ad callback.
   The title controls keep their full 44px target; only their empty bottom
   breathing room overlaps the following non-interactive preview/summary. */
main {
  padding-top: 4px;
}
main > section[data-home-module="main"] > .section-line,
main > .section-line {
  display: block;
  min-height: 0;
  margin: 0;
}
main > section[data-home-module="main"] > .section-line h1,
main > .section-line h1 {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  font-size: 16px;
  line-height: 24px;
}
main > section[data-home-module="main"] > .section-line > a,
main > .section-line > a,
main > .section-line > .result-summary {
  display: none;
}
body[data-page="game"] > main,
body[data-page="article"] > main,
body[data-page="error"] > main {
  padding-top: 0;
  margin-top: 0;
}
.detail-bar {
  margin-bottom: -8px;
  position: relative;
  z-index: 1;
}
.article-summary {
  margin-top: 0;
  margin-bottom: 10px;
}
.article-section h2 {
  margin-top: 12px;
  margin-bottom: 6px;
}
body[data-page="error"] > main > h1 {
  font-size: 18px;
  line-height: 24px;
}
body[data-page="error"] > main > .support-games {
  margin-top: 12px;
  padding-top: 8px;
}
body[data-page="error"] > main > .support-games > .section-line {
  display: none;
}
.primary-nav a,
.site-footer a {
  min-width: 44px;
}
.primary-nav a {
  justify-content: center;
}
.player-media > button {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
}
@media (max-width: 759px) {
  .player-media {
    aspect-ratio: 4/3;
  }
}
.player-stage:fullscreen .player-media {
  max-height: none !important;
}
.player-stage:fullscreen {
  max-width: none;
  width: 100vw;
  height: 100dvh;
  margin: 0;
  scrollbar-gutter: auto;
}

html.player-is-fullscreen {
  scrollbar-gutter: auto;
}

/* The home More row keeps its 44px target without stacked module gaps. */
.different-route {
  margin-top: 12px;
  padding-top: 8px;
}

/* Keep each list's continuation centered; quick-key settings remain secondary. */
.more {
  display: block;
  margin-inline: auto;
}
.pick-actions {
  display: grid;
  container-type: inline-size;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0 12px;
}
.pick-actions > .more {
  grid-column: 2;
  grid-row: 1;
  margin-inline: 0;
  justify-self: center;
}
.pick-actions > .key-settings {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  min-width: 0;
}
.pick-actions > .key-settings[open] {
  grid-column: 1/-1;
  grid-row: 2;
  justify-self: end;
  width: 65%;
  max-width: 65%;
}
.pick-actions > .key-settings[open] summary {
  justify-content: flex-end;
}
.section-line h1,
.section-line h2 {
  font-weight: 500;
}
main > section[data-home-module="main"] > .section-line h1,
main > .section-line h1 {
  font-size: 15px;
}
.section-line h2 {
  font-size: 16px;
}

/* One rhythm for discovery, reading and information, with real finite content. */
.catalogue-module > .section-line {
  display: block;
  margin: 0;
  min-height: 0;
}
.catalogue-module > .section-line h1 {
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  margin: 0;
}
.catalogue-module > .section-line .result-summary {
  display: none;
}
.catalogue-module > .more {
  margin-top: 4px;
}
.shortcut-grid,
.quick-directory {
  gap: 16px 12px;
}
.game-link {
  overflow: hidden;
  border-radius: 6px;
}
.card-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px 8px;
  padding-top: 7px;
}
.card-copy h2 {
  grid-column: 1;
  grid-row: 1;
  font-size: 14px;
  line-height: 1.45;
}
.key-tab {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}
.shortcut-grid > li:last-child:nth-child(odd),
.quick-directory > li:last-child:nth-child(odd) {
  grid-column: 1/-1;
}
.shortcut-grid > li:last-child:nth-child(odd) .game-link,
.quick-directory > li:last-child:nth-child(odd) .game-link {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}
.shortcut-grid > li:last-child:nth-child(odd) .game-picture,
.quick-directory > li:last-child:nth-child(odd) .game-picture {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
}
.shortcut-grid > li:last-child:nth-child(odd) .card-copy,
.quick-directory > li:last-child:nth-child(odd) .card-copy {
  padding: 0;
}
.different-route,
.reading-notes,
.support-games,
.browse-routes {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.different-route {
  margin-top: 12px;
  padding-top: 8px;
}
.section-line {
  gap: 10px;
  margin-bottom: 8px;
}
.section-line h1,
.section-line h2 {
  font-size: 15px;
  font-weight: 500;
}
.section-line > a {
  font-size: 13px;
  flex: none;
}
.compact-games {
  gap: 14px 12px;
}
.compact-games .game-link {
  display: block;
}
.compact-games .game-picture,
.support-games .compact-games .game-picture {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  border-radius: 5px;
}
.compact-games .card-copy {
  display: grid;
  padding-top: 7px;
}
.compact-games h2 {
  font-size: 14px;
}
.article-list a {
  padding: 12px 0;
}
.article-list h2 {
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 4px;
}
.article-list p {
  max-width: 78ch;
  font-size: 14px;
  line-height: 1.65;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.article-list > li:first-child a {
  padding-top: 6px;
}
.route-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}
.route-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid #eaf0f5;
}
.route-links a > svg {
  flex: none;
  color: var(--accent);
}
.route-links a > span:last-child {
  margin-left: auto;
  color: var(--muted);
}
.prose,
.reading-page {
  max-width: 72ch;
}
.prose > h1 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 12px;
}
.prose h2,
.article-section h2,
.source-note h2 {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  margin: 18px 0 6px;
}
.prose p,
.article-section p {
  margin: 6px 0 14px;
}
.help-page > section,
.information-page > section,
.legal-copy > section {
  padding-block: 6px 12px;
  border-bottom: 1px solid #eaf0f5;
}
.help-page > section:first-of-type h2,
.information-page > section:first-of-type h2,
.legal-copy > section:first-of-type h2 {
  margin-top: 6px;
}
.help-page > section:last-child,
.information-page > section:last-child,
.legal-copy > section:last-child {
  border-bottom: 0;
}
.key-example {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.key-example kbd {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  min-height: 30px;
  border: 1px solid #c9d3dd;
  border-radius: 4px;
  background: var(--wash);
  font:
    13px ui-monospace,
    monospace;
}
.key-example a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-left: 4px;
  font-size: 14px;
  color: var(--accent);
}
.key-example a svg {
  transform: rotate(180deg);
  width: 16px;
}
.article-summary {
  padding-left: 12px;
  border-left: 2px solid #c6d5e5;
  font-size: 16px;
  line-height: 1.65;
  margin-top: 0;
  margin-bottom: 16px;
}
.article-section + .article-section {
  padding-top: 2px;
}
.source-note {
  padding-top: 8px;
  margin-top: 24px;
}
.source-note h2 {
  margin-top: 0;
}
.source-note p {
  margin-bottom: 4px;
}
.source-list {
  border-top: 1px solid var(--line);
  padding-top: 4px;
  margin-top: 14px;
}
.player-tools button {
  border-color: transparent;
  background: var(--wash);
}
.player-tools {
  gap: 8px;
  margin-top: 8px;
}
.player-stage > [role="status"] {
  line-height: 1.5;
  margin-bottom: 16px;
}
.status-intro h1,
[data-invalid-game] h1 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
}
.status-intro p,
[data-invalid-game] p {
  color: var(--muted);
  font-size: 15px;
  margin: 4px 0;
}
.status-intro > .text-link {
  font-size: 14px;
}
.empty-message {
  color: var(--muted);
  font-size: 15px;
  margin: 6px 0 10px;
}
.site-footer {
  margin-top: 20px;
  padding-top: 12px;
}
@media (min-width: 760px) {
  .shortcut-grid,
  .quick-directory {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
  }
  .shortcut-grid > li,
  .quick-directory > li {
    grid-column: span 3;
  }
  .shortcut-grid > li:last-child:nth-child(4n + 1),
  .quick-directory > li:last-child:nth-child(4n + 1) {
    grid-column: 1/-1;
  }
  .shortcut-grid > li:nth-last-child(2):nth-child(4n + 1),
  .quick-directory > li:nth-last-child(2):nth-child(4n + 1),
  .shortcut-grid > li:last-child:nth-child(4n + 2),
  .quick-directory > li:last-child:nth-child(4n + 2) {
    grid-column: span 6;
  }
  .shortcut-grid > li:nth-last-child(3):nth-child(4n + 1),
  .quick-directory > li:nth-last-child(3):nth-child(4n + 1),
  .shortcut-grid > li:nth-last-child(2):nth-child(4n + 2),
  .quick-directory > li:nth-last-child(2):nth-child(4n + 2),
  .shortcut-grid > li:last-child:nth-child(4n + 3),
  .quick-directory > li:last-child:nth-child(4n + 3) {
    grid-column: span 4;
  }
  .shortcut-grid > li:last-child:nth-child(4n + 3) .game-link,
  .quick-directory > li:last-child:nth-child(4n + 3) .game-link {
    display: block;
  }
  .shortcut-grid > li:last-child:nth-child(4n + 3) .card-copy,
  .quick-directory > li:last-child:nth-child(4n + 3) .card-copy {
    padding-top: 7px;
  }
  .shortcut-grid > li:last-child:nth-child(4n + 1) .game-link,
  .quick-directory > li:last-child:nth-child(4n + 1) .game-link {
    grid-template-columns: minmax(0, 208px) minmax(0, 1fr);
  }
  .compact-games {
    gap: 14px 28px;
  }
  .compact-games .game-link {
    display: grid;
    grid-template-columns: minmax(96px, 28%) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
  }
  .compact-games .game-picture,
  .support-games .compact-games .game-picture {
    aspect-ratio: 4/3;
    width: 100%;
    height: auto;
  }
  .compact-games .card-copy {
    padding: 0;
  }
  .card-copy h2,
  .compact-games h2 {
    font-size: 15px;
  }
  .section-line h1,
  .section-line h2 {
    font-size: 16px;
  }
  .article-list h2 {
    font-size: 16px;
  }
  .route-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
}

/* State recovery content stays close to its message; actions follow real choices. */
[data-invalid-game] + .support-games {
  margin-top: 12px;
  padding-top: 8px;
}
body[data-page="game"]:has([data-invalid-game])
  > main
  > .support-games
  > .section-line {
  display: none;
}
[data-invalid-game] ~ .text-link {
  font-size: 14px;
}
.route-links a {
  min-width: 0;
  gap: 8px;
}
.route-links a > span:not(:last-child) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.route-links a > span:last-child {
  flex: none;
}
.category-back svg,
.source-note a svg {
  transform: rotate(180deg);
}

/* Instruction headings carry the content; duplicate page labels stay semantic. */
.prose > section:first-of-type {
  padding-top: 0;
}
.prose > section:first-of-type h2 {
  margin-top: 0;
}

/* A scaled brand glyph needs its own advance width at enlarged text sizes. */
.brand-mark {
  flex: none;
  width: 1em;
  min-width: 1em;
}
.brand > span:last-child {
  min-width: 0;
}
@media (max-width: 759px) {
  .brand {
    min-width: max-content;
    max-width: 100%;
  }
}

/* Keep enlarged quick-key text out of the centered continuation control. */
@container (max-width:17em) {
 .pick-actions > .key-settings { grid-column:1/-1; grid-row:2; }
}
