/* =========================
   CSS Variables
   ========================= */

:root {
  --bg-main: #ffffff;
  --bg-sidebar: #f5f5f5;
  --bg-note: #eef6fc;
  --bg-warning: #fff4ce;

  --border: #d2d2d2;
  --border-light: #e5e5e5;

  --text-main: #1f1f1f;
  --text-sub: #616161;

  --accent: #0067b8;
  --accent-soft: #c7e0f4;

  --code-bg: #f8f8f8;
}

/* =========================
   Base
   ========================= */

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--text-main);
  background: var(--bg-main);
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================
   Layout
   ========================= */

.layout {
  display: flex;
  min-height: 100vh;
}

/* =========================
   Sidebar
   ========================= */

.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 20px;
  box-sizing: border-box;
}

.logo {
  font-size: 22px;
  margin: 0 0 24px;
}

.sidebar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar li {
  margin: 1px 0;
}

.sidebar a {
  display: block;
  padding: 6px 8px;
  border-radius: 4px;
  color: var(--text-main);
  font-size: 14px;
}

.sidebar a:hover {
  background: #e8e8e8;
  text-decoration: none;
}

.sidebar a.active {
  background: #e1effa;
  color: var(--accent);
  font-weight: 250;
}

.nav-section {
  margin: 16px 0 6px;
  font-size: 12px;
  color: var(--text-sub);
  text-transform: uppercase;
}

/* =========================
   Content
   ========================= */

.content {
  flex: 1;
  padding: 40px;
  max-width: 1040px;
  box-sizing: border-box;
}

.content > h2 {
  font-size: 26px;
  margin-top: 0;
}

.content > h3 {
  margin-top: 36px;
  font-size: 18px;
  color: var(--accent);
}

/* =========================
   Version Badge (MediaWiki風)
   ========================= */

/* Version Badge 大きく表示 */
.version-badge {
  display: inline-block;
  margin-left: 12px;
  padding: 4px 12px;
  font-size: 16px;         /* 元12px → 16px */
  font-weight: 600;
  line-height: 1.4;
  color: #004578;
  background: #eef6fc;
  border: 2px solid #c7e0f4; /* 太めにして存在感UP */
  border-radius: 14px;
  vertical-align: middle;
  white-space: nowrap;
}

/* 非推奨・警告用 */
.version-badge.warning {
  background: #fff4ce;
  border-color: #ffb900;
  color: #663c00;
  font-weight: 600;
}

/* =========================
   Note / Warning Box
   ========================= */

.note {
  background: var(--bg-note);
  border-left: 4px solid #0078d4;
  padding: 12px 16px;
  margin: 16px 0;
}

.warning {
  background: var(--bg-warning);
  border-left: 4px solid #ffb900;
  padding: 12px 16px;
  margin: 16px 0;
}

/* =========================
   Code Block
   ========================= */

pre {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--border-light);
  padding: 16px;
  margin: 16px 0;
  overflow-x: auto;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

code {
  font-family: Consolas, Menlo, monospace;
  font-size: 14px;
}

/* =========================
   Copy Button
   ========================= */

.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  font-size: 12px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--accent);
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.85;
}

.copy-button:hover {
  opacity: 1;
}

/* =========================
   Footer (optional)
   ========================= */

.site-footer {
  border-top: 1px solid var(--border-light);
  padding: 16px;
  font-size: 13px;
  color: var(--text-sub);
  text-align: center;
}
