/* "How to play" text under each anul.space game page (2026-11-10).
   Added for Bing's "pages with insufficient content" warning. The game screen is
   untouched: the section sits out of the game's layout, one screen below the top,
   and only shows when the page is scrolled. Inserted by scripts/game-about.mjs from
   content/game-about/<slug>.html; game-about.js keeps game keys from scrolling. */

/* Full-screen games (data-place="below"): let the page scroll down to the text.
   Body keeps whatever height the game gave it; only clipping is lifted. The
   scrollbar stays hidden so the game keeps its full width (a classic Windows
   scrollbar would take 15 px from it). */
html:has(> body > #how-to-play[data-place="below"]) {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: none;
}
html:has(> body > #how-to-play[data-place="below"])::-webkit-scrollbar {
  display: none;
}
html:has(> body > #how-to-play[data-place="below"]) > body {
  overflow: visible !important;
}

/* Undo every style a game sets globally (fonts, user-select, touch-action,
   list resets, heading sizes) before applying the section's own look. */
#how-to-play, #how-to-play * {
  all: revert;
}

#how-to-play {
  position: relative;
  display: block;
  box-sizing: border-box;
  margin: 0;
  padding: 44px 20px 72px;
  background: #fffdf7;
  color: #161512;
  border-top: 1px solid rgba(22, 21, 18, 0.14);
  font: 400 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  text-align: left;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: text;
  user-select: text;
  touch-action: auto;
  overflow-wrap: break-word;
}
/* Out of the game's layout, one screen down; slides over a fixed game layer. */
#how-to-play[data-place="below"] {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 2147483000;
}
/* Pages that already scroll: the text follows the page. */
#how-to-play[data-place="flow"] {
  clear: both;
  width: 100%;
}
#how-to-play .game-about-inner {
  display: block;
  max-width: 680px;
  margin: 0 auto;
}
#how-to-play h2 {
  display: block;
  margin: 0 0 12px;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 750;
  color: #161512;
}
#how-to-play h3 {
  display: block;
  margin: 28px 0 8px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: #161512;
}
#how-to-play p {
  display: block;
  margin: 0 0 10px;
}
#how-to-play ol,
#how-to-play ul {
  display: block;
  margin: 0 0 10px;
  padding-left: 1.4em;
}
#how-to-play li {
  display: list-item;
  margin: 0 0 6px;
}
#how-to-play strong {
  font-weight: 700;
}
#how-to-play a {
  color: #9a3412;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
#how-to-play a:hover {
  color: #161512;
}
#how-to-play a:focus-visible {
  outline: 2px solid #9a3412;
  outline-offset: 2px;
  border-radius: 2px;
}
#how-to-play ul.game-about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 32px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(22, 21, 18, 0.14);
  list-style: none;
}
#how-to-play ul.game-about-links li {
  display: block;
  margin: 0;
}

@media (max-width: 480px) {
  #how-to-play {
    padding: 32px 16px 56px;
    font-size: 16px;
  }
  #how-to-play h2 {
    font-size: 22px;
  }
}
