:root {
  --primary: #0891b2;
  --primary-dark: #0e7490;
  --primary-light: #e0f2fe;
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #0891b2;
  --sidebar-hover: #334155;
  --content-bg: #f8fafc;
  --white: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --step-bg: #f0f9ff;
  --step-border: #bae6fd;
  --note-bg: #fefce8;
  --note-border: #fde047;
  --warn-bg: #fff7ed;
  --warn-border: #fed7aa;
  --sidebar-width: 260px;
  --header-height: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--content-bg);
  line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--primary);
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 100;
  gap: 12px;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: white;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  margin: 4px 0;
  border-radius: 2px;
  transition: transform 0.2s;
}

.site-logo {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-logo svg { flex-shrink: 0; }

/* ===== SIDEBAR ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 110;
}

.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  overflow-y: auto;
  z-index: 120;
  padding-bottom: 24px;
}

.sidebar-section {
  padding: 16px 0 4px;
}

.sidebar-section-title {
  padding: 0 16px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  color: var(--sidebar-text);
  font-size: 0.875rem;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.sidebar-nav li a:hover {
  background: var(--sidebar-hover);
  color: white;
}

.sidebar-nav li a.active {
  background: var(--sidebar-active);
  color: white;
  font-weight: 600;
}

.sidebar-nav li a svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.sidebar-nav.sub li a {
  padding-left: 40px;
  font-size: 0.825rem;
  color: #94a3b8;
}
.sidebar-nav.sub li a:hover { color: white; }
.sidebar-nav.sub li a.active { color: white; background: var(--sidebar-hover); }

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

.content-inner {
  max-width: 860px;
  padding: 40px 48px;
}

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.page-header .label {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.page-header h1 {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===== SECTION ===== */
.doc-section {
  margin-bottom: 48px;
}

.doc-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}

.doc-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 10px;
}

.doc-section p {
  margin-bottom: 12px;
  color: #374151;
}

/* ===== STEPS ===== */
.steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step {
  display: flex;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.step-body h4 {
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 4px;
}

.step-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== NOTE / WARN ===== */
.note, .warn {
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 0.875rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.note {
  background: var(--note-bg);
  border-left: 4px solid var(--note-border);
}

.warn {
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-border);
}

.note svg, .warn svg { flex-shrink: 0; margin-top: 1px; }

/* ===== INDEX CARDS ===== */
.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.index-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  display: block;
}

.index-card:hover {
  box-shadow: 0 4px 16px rgba(8,145,178,0.12);
  border-color: var(--primary);
  transform: translateY(-2px);
  text-decoration: none;
}

.index-card-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.index-card h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.index-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== TABLE ===== */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 16px 0;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.doc-table th {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.doc-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.doc-table tr:last-child td { border-bottom: none; }
.doc-table tr:hover td { background: #f8fafc; }

/* ===== BADGE ===== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* ===== ACCORDION (FAQ) ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
  transition: background 0.15s;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; }

.faq-item summary:hover { background: #f8fafc; }

.faq-q-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8125rem;
}

.faq-chevron {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-item[open] summary {
  border-bottom: 1px solid var(--border);
}

.faq-answer {
  padding: 16px 20px 16px 56px;
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.75;
}

.faq-answer p { margin-bottom: 8px; }
.faq-answer p:last-child { margin-bottom: 0; }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 48px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb span { color: #94a3b8; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hamburger { display: block; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }

  .main-content { margin-left: 0; }

  .content-inner { padding: 24px 20px; }

  .page-header h1 { font-size: 1.5rem; }

  .site-footer { padding: 16px 20px; }
}
