:root {
  --brand: #b0008b;
  --brand-dark: #87006d;
  --ink: #24262b;
  --muted: #687081;
  --border: #e3e5ea;
  --soft: #f7f8fb;
  --note: #e53935;
  --tip-bg: #f4fbf8;
  --tip-border: #8dd4be;
  --note-bg: #fff8f7;
  --related-bg: #f6f2fb;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  background: #fff;
}

body {
  margin: 0;
}

a {
  color: #0b6fbd;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.site-header__inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  min-height: 72px;
  padding: 0 28px;
}

.brand {
  color: var(--brand);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand:hover {
  color: var(--brand-dark);
  text-decoration: none;
}

.header-nav {
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.header-nav a {
  color: #4a4f5c;
}

.layout {
  display: grid;
  gap: 44px;
  grid-template-columns: 260px minmax(0, 760px);
  margin: 0 auto;
  max-width: 1180px;
  padding: 38px 28px 72px;
}

.sidebar {
  align-self: start;
  border-right: 1px solid var(--border);
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding-right: 22px;
  position: sticky;
  top: 20px;
}

.sidebar__title {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

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

.sidebar li {
  margin: 0;
}

.sidebar a {
  color: #4c5260;
  display: block;
  font-size: 13px;
  line-height: 1.45;
  padding: 9px 0;
}

.nav-tree > li {
  border-bottom: 1px solid #eceef3;
}

.nav-home a {
  color: var(--brand);
  font-weight: 700;
}

.nav-section {
  padding: 9px 0 10px;
}

.nav-section__link,
.nav-section__label {
  color: #2f3440;
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  padding: 0 0 6px;
}

.nav-section__link::before,
.nav-section__label::before {
  color: var(--brand);
  content: "▸";
  font-size: 11px;
  margin-right: 6px;
}

.nav-articles {
  border-left: 2px solid #ead7e8;
  margin-left: 5px !important;
  padding-left: 12px !important;
}

.nav-article a {
  color: #616877;
  font-size: 12px;
  padding: 5px 0;
}

.article {
  min-width: 0;
}

.article-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px;
  margin-bottom: 8px;
}

.article-meta span {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
}

.article h1 {
  border-bottom: 1px solid var(--border);
  color: var(--brand);
  font-size: 30px;
  line-height: 1.35;
  margin: 0 0 22px;
  padding-bottom: 14px;
}

.article h2 {
  border-bottom: 1px solid var(--border);
  color: #30333a;
  font-size: 23px;
  line-height: 1.45;
  margin: 42px 0 18px;
  padding-bottom: 8px;
}

.article h3 {
  color: #30333a;
  font-size: 19px;
  line-height: 1.45;
  margin: 32px 0 12px;
}

.article h4 {
  color: #30333a;
  font-size: 15px;
  margin: 24px 0 10px;
}

.article p {
  margin: 0 0 18px;
}

.article ul,
.article ol {
  margin: 0 0 20px;
  padding-left: 1.6em;
}

.article li {
  margin: 0 0 10px;
  padding-left: 2px;
}

.article li > ul,
.article li > ol {
  margin-top: 10px;
  margin-bottom: 10px;
}

.article strong {
  font-weight: 700;
}

.tip,
.note,
.related {
  border-radius: 8px;
  margin: 16px 0 20px;
  padding: 14px 16px;
}

.tip {
  background: var(--tip-bg);
  border: 1px solid var(--tip-border);
}

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

.related {
  background: var(--related-bg);
  border: 1px solid #cfb5e8;
}

.note strong {
  color: #c92828;
}

.tip strong,
.related strong {
  color: var(--brand);
}

.article img {
  border: 0;
  height: auto;
  max-width: 100%;
  vertical-align: middle;
}

.article p > img:only-child {
  border: 1px solid var(--border);
  border-radius: 4px;
  display: block;
  margin: 18px 0 24px;
}

.article li img,
.article td img {
  max-height: 42px;
  width: auto;
}

.article li img[src*="kobetsu_edit01"],
.article p > img[src*="ruletech_editor"],
.article p > img[src*="スクリーンショット"] {
  max-height: none;
}

.table-wrap {
  margin: 22px 0 30px;
  overflow-x: auto;
}

.section-list {
  border-top: 1px solid var(--border);
  margin: 14px 0 32px;
}

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

.section-list li {
  border-bottom: 1px solid var(--border);
  margin: 0;
  padding: 0;
}

.section-list a {
  color: #30333a;
  display: block;
  font-size: 16px;
  font-weight: 600;
  padding: 15px 4px;
}

.section-list a::after {
  color: var(--brand);
  content: "›";
  float: right;
  font-size: 22px;
  line-height: 1;
}

table {
  border-collapse: collapse;
  font-size: 14px;
  min-width: 680px;
  width: 100%;
}

th,
td {
  border: 1px solid #d9dce3;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f5f6fa;
  color: #30333a;
  font-weight: 700;
}

td ul,
td ol {
  margin: 6px 0;
}

code {
  background: #f4f5f7;
  border-radius: 4px;
  color: #333;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 0.1em 0.32em;
}

@media (max-width: 900px) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px;
  }

  .layout {
    display: block;
    padding: 28px 20px 56px;
  }

  .sidebar {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 28px;
    max-height: 260px;
    padding: 14px 16px;
    position: static;
  }

  .article h1 {
    font-size: 25px;
  }
}
