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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  background: #fafafa;
}

a { color: #c8682c; text-decoration: none; }
a:hover { text-decoration: underline; }

.doc-header {
  background: #c8682c;
  color: #fff;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.doc-header .brand {
  font-size: 18px;
  font-weight: 600;
}

.doc-header .version {
  font-size: 14px;
  opacity: 0.85;
}

.doc-wrapper {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 70px);
}

.doc-sidebar {
  width: 260px;
  flex-shrink: 0;
  padding: 40px 20px;
  border-right: 1px solid #e5e5e5;
  background: #fff;
}

.doc-sidebar .nav-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #c8682c;
  margin: 24px 0 8px;
}

.doc-sidebar .nav-label:first-child {
  margin-top: 0;
}

.doc-sidebar ul {
  list-style: none;
}

.doc-sidebar li a {
  display: block;
  padding: 6px 0 6px 12px;
  font-size: 14px;
  color: #555;
  border-left: 2px solid transparent;
  transition: all 0.15s;
}

.doc-sidebar li a:hover,
.doc-sidebar li a.active {
  color: #c8682c;
  border-left-color: #c8682c;
  text-decoration: none;
}

.doc-content {
  flex: 1;
  padding: 40px 48px;
  max-width: 820px;
}

.doc-content h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1a1a1a;
}

.doc-content h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 40px 0 12px;
  color: #1a1a1a;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.doc-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 8px;
  color: #333;
}

.doc-content p {
  margin-bottom: 12px;
  color: #555;
}

.doc-content ul, .doc-content ol {
  margin: 8px 0 16px 24px;
  color: #555;
}

.doc-content li {
  margin-bottom: 6px;
}

.doc-content code {
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  background: #f0eee8;
  padding: 2px 6px;
  border-radius: 3px;
  color: #c8682c;
}

.doc-content pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 16px 20px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 12px 0 20px;
  font-size: 13px;
  line-height: 1.5;
}

.doc-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 13px;
}

.doc-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
}

.doc-content th, .doc-content td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e5e5;
  font-size: 14px;
}

.doc-content th {
  font-weight: 600;
  color: #1a1a1a;
  background: #f8f6f2;
}

.doc-content td {
  color: #555;
}

.notice {
  padding: 16px 20px;
  border-radius: 6px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
}

.notice.info {
  background: #eef2f7;
  border-left: 4px solid #4a7c9b;
}

.notice.warning {
  background: #fff8eb;
  border-left: 4px solid #e6a700;
}

.notice.success {
  background: #eef7ee;
  border-left: 4px solid #4a9b5a;
}

.notice strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.notice p {
  margin-bottom: 0;
}

.credit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 12px 0 20px;
}

.credit-tag {
  background: #f8f6f2;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.credit-tag a {
  font-size: 12px;
}

.changelog-entry {
  background: #f8f6f2;
  padding: 16px 20px;
  border-radius: 6px;
  margin: 12px 0;
}

.changelog-entry .version-tag {
  font-weight: 700;
  color: #c8682c;
}

.changelog-entry .date-tag {
  color: #888;
  font-size: 14px;
}

.changelog-entry ul {
  margin: 12px 0 0 20px;
}

.doc-footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid #e5e5e5;
  font-size: 13px;
  color: #888;
}

@media (max-width: 768px) {
  .doc-wrapper {
    flex-direction: column;
  }
  .doc-header {
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 4px;
  }
  .doc-header .brand {
    font-size: 15px;
  }
  .doc-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
    padding: 16px 20px;
  }
  .doc-sidebar li a {
    padding: 8px 0 8px 12px;
    font-size: 15px;
  }
  .doc-content {
    padding: 24px 20px;
  }
  .doc-content h1 {
    font-size: 26px;
  }
  .doc-content h2 {
    font-size: 19px;
  }
  .doc-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .doc-content th,
  .doc-content td {
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 10px;
  }
  .doc-content pre {
    font-size: 12px;
    padding: 12px 14px;
  }
  .doc-content pre code {
    font-size: 12px;
  }
  .credit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .doc-header {
    padding: 12px 16px;
  }
  .doc-header .brand {
    font-size: 14px;
  }
  .doc-header .version {
    font-size: 12px;
  }
  .doc-content {
    padding: 20px 16px;
  }
  .doc-content h1 {
    font-size: 22px;
  }
  .doc-content h2 {
    font-size: 17px;
  }
  .doc-content ul,
  .doc-content ol {
    margin-left: 18px;
  }
  .doc-content code {
    font-size: 12px;
    word-break: break-all;
  }
  .notice {
    padding: 14px 16px;
    font-size: 13px;
  }
}
