/* The wiki (client/wiki): the game's colours (layout.css), a reading layout. Page-specific rules
   use a "w-<page>-" prefix and live at the end of this file, one block per page. */
.w-body { min-height: 100vh; display: block; background: var(--bg, #0b1424); color: var(--text, #e8eefc); overflow-y: auto; height: auto; }
.w-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; background: #111c31; border-bottom: 2px solid #0a1120; }
.w-logo { display: flex; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 1.25rem; color: var(--text); text-decoration: none; }
.w-logo span { color: #c08bff; }
.w-top-tools { display: flex; align-items: center; gap: 8px; }
.w-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; max-width: 1280px; margin: 0 auto; padding: 18px; }
.w-side { position: sticky; top: 70px; align-self: start; max-height: calc(100vh - 90px); overflow-y: auto; display: grid; gap: 12px; }
.w-search { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid #2a3f6b; background: #0b1424; color: var(--text); }
.w-navgroup h4 { font-family: var(--pixel); font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 6px 0 4px; }
.w-navgroup a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.92rem; }
.w-navgroup a:hover { background: #17284a; }
.w-navgroup a.on { background: #1f3460; color: var(--accent); }
.w-main { min-width: 0; line-height: 1.6; padding-bottom: 60px; }
.w-main h1 { font-family: var(--pixel); font-size: 2rem; margin-bottom: 10px; }
.w-main h2 { font-family: var(--pixel); font-size: 1.35rem; margin: 26px 0 8px; color: var(--accent); }
.w-main h3 { font-family: var(--pixel); font-size: 1.05rem; margin: 18px 0 6px; }
.w-main p, .w-main li { color: #d3dcef; }
.w-main ul, .w-main ol { padding-left: 22px; margin: 6px 0 10px; }
.w-main a { color: #8fb8ff; }
.w-main code { background: #0b1424; border: 1px solid #22355c; border-radius: 4px; padding: 0 4px; font-size: 0.9em; }
.w-loading, .w-error { color: var(--muted); }
.w-error { color: #ff8a8a; }
.w-box { margin: 12px 0; padding: 10px 14px; border-radius: 10px; border: 1px solid #2a3f6b; background: #0e1a30; }
.w-tip { border-color: #2f6b3a; background: #0f2418; }
.w-note { border-color: #2a3f6b; }
.w-warn { border-color: #8a6d1f; background: #241c0a; }
.w-table-wrap { overflow-x: auto; margin: 10px 0; border-radius: 10px; border: 1px solid #22355c; }
.w-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.w-table th { position: sticky; top: 0; background: #14223d; text-align: left; padding: 8px 10px; font-family: var(--pixel); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.w-table td { padding: 6px 10px; border-top: 1px solid #1a2b4a; vertical-align: middle; }
.w-table tr:hover td { background: #101d35; }
.w-nosprite { display: inline-block; width: 32px; height: 32px; }
.w-item { image-rendering: pixelated; vertical-align: middle; }
.w-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 10px 0; }
.w-card { padding: 12px; border-radius: 12px; background: #0e1a30; border: 1px solid #22355c; }
.w-card h3 { margin-top: 0; }
@media (max-width: 760px) {
  .w-layout { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .w-side { position: static; max-height: none; }
  .w-main h1 { font-size: 1.5rem; }
}

/* ---------------------------------------------------------------- page-specific blocks below */
@media (max-width: 520px) {
  .w-top { flex-wrap: wrap; padding: 8px 12px; }
  .w-logo { font-size: 1rem; }
  .w-top-tools { margin-left: auto; }
  .w-top-tools select { max-width: 120px; }
}
.w-main img, .w-main canvas { max-width: 100%; }
/* the page list's button: only on a phone, where the list folds behind it */
.w-menu { display: none; }
@media (max-width: 760px) {
  .w-menu { display: block; width: 100%; text-align: left; }
  .w-side:not(.open) #w-filter, .w-side:not(.open) #w-nav { display: none; }
}

/* the trademark notice at the bottom */
.w-legal { text-align: center; font-size: 0.75rem; color: #8a93ad; padding: 14px 16px 22px; border-top: 1px solid #22355c; }
