/* ── Wiki Sidebar (shared) ────────────────────────── */
.wiki-page-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.wiki-sidebar {
  background: #12122a;
  border-right: 1px solid #2a2a5e;
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.ws-header {
  display: block;
  padding: 0.8rem 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  border-bottom: none;
  margin: 0 0.5rem 0.5rem;
  background: #1a1a3e;
  border: 2px solid #2a2a5e;
  border-radius: 10px;
  text-align: center;
  transition: border-color 0.2s;
}

.ws-header:hover {
  border-color: #4cff72;
}

.ws-nav { padding: 0 0.5rem; }
.ws-section { margin-bottom: 0.3rem; }

.ws-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.45rem 0.6rem;
  background: none;
  border: none;
  color: #ccc;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.ws-toggle:hover {
  background: rgba(76, 255, 114, 0.08);
  color: #4cff72;
}

.ws-arrow { font-size: 0.7rem; color: #666; }
.ws-sub { padding-left: 0.8rem; }
.ws-sub.ws-hidden { display: none; }

.ws-sub a {
  display: block;
  padding: 0.35rem 0.6rem;
  color: #999;
  text-decoration: none;
  font-size: 0.82rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.ws-sub a:hover {
  background: rgba(76, 255, 114, 0.08);
  color: #4cff72;
}

.wiki-main {
  min-width: 0;
  overflow-x: hidden;
}

/* Mobile sidebar button */
.ws-mobile-btn {
  display: none;
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 998;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1a1a3e;
  border: 2px solid #2a2a5e;
  font-size: 1.2rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.ws-mobile-btn:hover { border-color: #4cff72; }

@media (max-width: 700px) {
  .wiki-page-layout { grid-template-columns: 1fr; }
  .wiki-sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    width: 240px;
    z-index: 999;
    transition: left 0.3s;
  }
  .wiki-sidebar.ws-open { left: 0; }
  .ws-mobile-btn { display: block; }
}
