/* ═══════════════════════════════════════════════════════════
   DOCS PAGE STYLES
   ═══════════════════════════════════════════════════════════ */

/* docs-body is now just the lobby-body in scroll mode — no overrides needed */
.docs-body {
  /* lobby.css already handles the scrollable layout */
}

#docs-app {
  position: relative;
  z-index: 2;
  max-width: 980px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#docs-container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
}

/* Sidebar nav */
#docs-nav {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  width: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: linear-gradient(160deg,#1e1608,#160f04);
  border: 1px solid #3a2510;
  border-radius: 4px;
  padding: 14px 12px;
}

#docs-nav a {
  color: #9a7040;
  font-family: Georgia, serif;
  font-size: 0.75rem;
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 2px;
  letter-spacing: 0.04em;
  transition: color 0.15s, background 0.15s;
}
#docs-nav a:hover {
  color: #d4a017;
  background: rgba(212,160,23,0.07);
}

/* Content */
#docs-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

section {
  background: linear-gradient(160deg,#1e1608,#160f04);
  border: 1px solid #3a2510;
  border-radius: 4px;
  padding: 28px 32px;
  margin-bottom: 16px;
}

section h2 {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  color: #d4a017;
  letter-spacing: 0.1em;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #3a2510;
}

section h3 {
  font-family: Georgia, serif;
  font-size: 0.9rem;
  color: #c8a050;
  letter-spacing: 0.06em;
  margin: 20px 0 8px;
}
section h3:first-of-type { margin-top: 0; }

section p, section li {
  font-family: Georgia, serif;
  font-size: 0.8rem;
  color: #b89860;
  line-height: 1.7;
  margin: 0 0 10px;
}

section ul, section ol {
  margin: 0 0 10px;
  padding-left: 20px;
}

section li { margin-bottom: 4px; }

/* Kingdom grid */
.kingdom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.kingdom-card {
  background: #0e0c06;
  border: 1px solid;
  border-radius: 4px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 3px;
  margin-bottom: 6px;
}

.kc-crest { font-size: 1.6rem; }
.kc-name  { font-family: Georgia, serif; font-size: 0.95rem; color: #d4a017; letter-spacing: 0.06em; }
.kc-bonus { font-family: Georgia, serif; font-size: 0.65rem; color: #9a7040; font-style: italic; }

.kc-stat {
  font-family: Georgia, serif;
  font-size: 0.72rem;
  color: #9a7040;
}
.kc-stat strong { color: #c8a050; }

.kc-perk {
  font-family: Georgia, serif;
  font-size: 0.72rem;
  color: #80c050;
  background: rgba(80,160,32,0.08);
  border: 1px solid rgba(80,160,32,0.2);
  border-radius: 2px;
  padding: 4px 8px;
  margin-top: 4px;
}

/* Action list */
.action-list { display: flex; flex-direction: column; gap: 12px; }

.action-entry {
  background: #0e0c06;
  border: 1px solid #2a1e08;
  border-radius: 3px;
  padding: 14px 16px;
}

.action-name {
  font-family: Georgia, serif;
  font-size: 0.9rem;
  color: #d4a017;
  margin-bottom: 2px;
}

.action-cost {
  font-family: Georgia, serif;
  font-size: 0.68rem;
  color: #9a7040;
  font-style: italic;
  margin-bottom: 6px;
}

.action-entry p, .action-entry ul, .action-entry li {
  margin-bottom: 0;
}

/* Tip box */
.tip-box {
  background: rgba(212,160,23,0.06);
  border: 1px solid rgba(212,160,23,0.25);
  border-radius: 3px;
  padding: 14px 18px;
  font-family: Georgia, serif;
  font-size: 0.78rem;
  color: #c8a050;
  margin-top: 16px;
}

/* ═══════════════════════════════════════════════════════════
   LORE SECTION (embedded in lobby)
   ═══════════════════════════════════════════════════════════ */

#lore-section {
  /* Break out of the narrow lobby-app column */
  width: min(860px, calc(100vw - 40px));
  margin-top: 48px;
}

#lore-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
#lore-divider::before,
#lore-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #3a2510, transparent);
}
#lore-divider span {
  font-family: Georgia, serif;
  font-size: 0.8rem;
  color: #9a7040;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

/* Horizontal anchor nav */
#lore-anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 20px;
  background: linear-gradient(160deg,#1e1608,#160f04);
  border: 1px solid #3a2510;
  border-radius: 4px;
  padding: 10px 14px;
}
#lore-anchor-nav a {
  color: #9a7040;
  font-family: Georgia, serif;
  font-size: 0.75rem;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 2px;
  letter-spacing: 0.04em;
  transition: color 0.15s, background 0.15s;
}
#lore-anchor-nav a:hover {
  color: #d4a017;
  background: rgba(212,160,23,0.07);
}

/* When embedded in lobby, docs-container has no sidebar */
#lore-section #docs-container {
  display: block;
}

/* Responsive */
@media (max-width: 700px) {
  #docs-container { flex-direction: column; }
  #docs-nav { position: static; width: 100%; flex-direction: row; flex-wrap: wrap; }
  .kingdom-grid { grid-template-columns: 1fr; }
  #lore-anchor-nav { gap: 2px; }
}
