/* "How to play" page: one long paper sheet over the desk, stat tables that scroll sideways on phones. */

.docs-screen {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto; overscroll-behavior: contain;
  padding: max(24px, env(safe-area-inset-top)) 16px 32px; background: rgba(60, 38, 16, 0.55);
}
.docs-sheet { width: min(980px, 100%); margin: 0 auto; color: var(--ink); }
.docs-head { display: flex; align-items: center; gap: 10px; }
.docs-head .menu-heading { margin-right: auto; }
.menu-top-actions { display: flex; gap: 8px; }
.docs-link { font-family: var(--marker); min-width: 2.2em; padding: 3px 10px; }

.docs-body { display: flex; flex-direction: column; gap: 18px; font-size: 1.05rem; line-height: 1.4; }
.docs-body h3 { margin: 0 0 6px; font-family: var(--script); font-size: 1.8rem; color: var(--red); }
.docs-body h4 { margin: 10px 0 4px; font-size: 1.15rem; }
.docs-body p, .docs-body ul { margin: 0 0 8px; }
.docs-body ul { padding-left: 1.2em; }
.docs-body li { margin-bottom: 4px; }
.docs-body section { scroll-margin-top: 16px; }
.docs-body kbd {
  display: inline-block; min-width: 1.4em; padding: 0 5px; text-align: center; color: var(--ink);
  border: 1.5px solid var(--ink-soft); border-radius: 4px; background: var(--paper-2);
}
.docs-toc { font-size: 0.95rem; color: var(--muted); }
.docs-toc a { color: var(--ink); }

.docs-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: var(--paper-2); }
.docs-table th, .docs-table td { padding: 5px 8px; border-bottom: 1px dashed var(--ink-soft); text-align: left; vertical-align: top; }
.docs-table th { font-family: var(--marker); font-weight: 400; font-size: 0.85rem; white-space: nowrap; border-bottom: 2px solid var(--ink); }
.docs-table td:not(:last-child) { white-space: nowrap; }
.docs-costs { display: inline-block; min-width: 9em; white-space: normal; }
.docs-table td:last-child { min-width: 16em; }
.docs-table small { color: var(--muted); }
.docs-unit { width: 1.9em; height: 1.9em; margin: -0.4em 4px -0.4em -2px; vertical-align: middle; }
.docs-gallery td:last-child { min-width: 0; }
.docs-level { margin: 0; text-align: center; font-size: 0.8rem; color: var(--muted); }
.docs-level img { display: block; width: 3.4em; height: 3.4em; margin: 0 auto 2px; }
.docs-dot { display: inline-block; width: 0.7em; height: 0.7em; margin-right: 6px; border-radius: 50%; border: 1px solid var(--ink-soft); }
.docs-neg { color: var(--red); font-weight: 700; }

/* version tag and "What's new" sheet; the red dot marks a version not opened yet */
.version-tag {
  position: relative; padding: 2px 8px; border: 1px dashed var(--ink-soft); border-radius: 4px;
  background: none; color: var(--muted); font-family: var(--hand); font-size: 0.85rem; font-weight: 400;
}
.version-tag:hover:not(:disabled) { background: var(--paper-2); color: var(--ink); }
.version-tag.has-news::after, .version-item.has-news::after {
  content: ""; position: absolute; top: -4px; right: -4px; width: 9px; height: 9px;
  border: 1.5px solid var(--paper-2); border-radius: 50%; background: var(--red);
}
.version-item { position: relative; }
.menu-footer { position: relative; z-index: 1; display: flex; justify-content: center; padding: 14px 0 0; grid-column: 1 / -1; }
.menu-footer .version-tag { background: var(--paper-2); }
.top-actions .version-tag { align-self: center; background: none; }
.news-sheet { width: min(720px, 100%); }
.news-version { color: var(--muted); font-size: 0.95rem; }
.news-release { padding-bottom: 12px; border-bottom: 1px dashed var(--ink-soft); }
.news-release:last-child { border-bottom: none; }
.news-release h3 small { font-family: var(--hand); font-size: 1rem; color: var(--muted); }
.news-release.current h3::after {
  content: "★"; margin-left: 8px; font-size: 1.2rem; color: var(--gold);
}
.news-empty { color: var(--muted); }

@media (max-width: 800px) {
  .docs-screen { padding: max(16px, env(safe-area-inset-top)) 8px 20px; }
  .docs-body { font-size: 1rem; }
  .docs-table { font-size: 0.85rem; }
}
