body.doc {
  margin: 0;
  min-height: 100dvh;
  background-color: #20202e;
  background-image: radial-gradient(circle, rgba(46, 125, 50, 0.18) var(--dot), transparent var(--dot-edge));
  background-size: 4px 4px;
  color: var(--ink);
}

.doc-wrap {
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header.doc-wrap {
  padding-top: max(0.9rem, env(safe-area-inset-top));
}

header.doc-wrap h1 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.5rem;
}

header.doc-wrap .taper { margin: 0 0 0.9rem; }

/* The body of the page sits on one of the game cards. */
.doc-card {
  box-sizing: border-box;
  width: calc(100% - 2rem);
  max-width: calc(36rem - 2rem);
  margin-bottom: 1.1rem;
  padding: 0.9rem 1.1rem 1rem;
}

.doc-card > :first-child { margin-top: 0; }

.doc-card > :last-child { margin-bottom: 0; }

.doc-wrap p,
.doc-wrap li {
  line-height: 1.45;
}

.doc-wrap a { color: var(--green-bright); }

.doc-wrap code {
  padding: 0 0.25em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.92em;
}

/* Back link on the left, the tip / share / help tools on the right, same row. */
.doc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0 0 0.3rem;
}

.doc-bar .crumb {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crumb {
  margin: 0 0 0.3rem;
  font-size: 0.85rem;
}

.crumb a { text-decoration: none; }

.doc-tip {
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 1rem 0.25rem;
}

.doc-tip .tip-slot {
  justify-content: flex-start;
  margin: 0;
}

footer.legal-foot.doc-wrap {
  justify-content: flex-start;
  padding-bottom: max(1.2rem, env(safe-area-inset-bottom));
}
