:root {
  --wiki-link:#0645ad; --wiki-border:#a2a9b1; --wiki-text:#202122;
  --wiki-muted:#54595d; --wiki-bg:#f6f6f6;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  margin:0; color:var(--wiki-text); background:#fff;
  font:15px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;
}
a { color:var(--wiki-link); text-decoration:none; }
a:hover { text-decoration:underline; }

.topbar {
  height:74px; display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid #c8ccd1; padding:0 28px;
  background:linear-gradient(to bottom,rgba(255,255,255,.96),rgba(255,255,255,.78));
}
.brand { display:flex; align-items:center; gap:10px; color:#202122; line-height:1; }
.brand:hover { text-decoration:none; }
.brand-mark {
  width:44px; height:44px; display:grid; place-items:center;
  border:2px solid #202122; border-radius:50%; background:#fff;
  font:bold 28px Georgia,serif;
}
.brand-name { font:bold 25px Georgia,"Times New Roman",serif; }
.brand-sub { display:block; margin-top:5px; font-size:11px; color:#54595d; }
.top-actions { display:flex; align-items:center; gap:18px; font-size:13px; }
.top-actions a { color:#54595d; }
.search-wrap { position:relative; width:min(290px,28vw); }
.search-wrap input {
  width:100%; height:34px; border:1px solid var(--wiki-border); border-radius:2px;
  padding:6px 38px 6px 10px; font:14px inherit;
}
.search-wrap button {
  position:absolute; right:1px; top:1px; width:34px; height:32px;
  border:0; background:transparent; cursor:pointer; color:#54595d; font-size:16px;
}

.page-tabs {
  height:40px; display:flex; align-items:flex-end; gap:18px;
  margin-left:208px; padding:0 28px; border-bottom:1px solid #c8ccd1;
  background:#fff; font-size:13px;
}
.page-tabs a { height:34px; display:flex; align-items:center; color:#54595d; }
.page-tabs a.active { border-bottom:2px solid var(--wiki-link); color:#202122; }

.layout {
  display:grid; grid-template-columns:180px minmax(0,1120px);
  max-width:1330px; margin:0 auto;
}
.sidebar {
  padding:24px 18px; border-right:1px solid #e6e6e6;
  min-height:calc(100vh - 114px);
  background:linear-gradient(to right,#f9f9f9,#fff 72%);
}
.side-logo { margin-bottom:22px; text-align:center; }
.side-logo .mini {
  width:96px; height:96px; margin:0 auto 8px; border:1px solid #c8ccd1;
  border-radius:50%;
  background:radial-gradient(circle at 50% 38%,#fff 0 16%,#dcecf8 17% 28%,#78b0db 29% 43%,#edf5fb 44% 100%);
  display:grid; place-items:center; color:#4a7ba3;
  font:bold 46px Georgia,serif; box-shadow:inset 0 0 0 5px #fff;
}
.side-logo strong { display:block; font-size:13px; }
.nav-heading {
  margin:18px 0 5px; padding-bottom:3px; border-bottom:1px solid #d8d8d8;
  color:#54595d; font-size:12px;
}
.side-nav { list-style:none; margin:0; padding:0; font-size:13px; }
.side-nav li { padding:3px 0; }
.side-nav a { color:#0645ad; }

main { min-width:0; padding:20px 34px 60px; }
.title-row {
  display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid #a2a9b1; margin-bottom:12px;
}
h1 { margin:0; font:normal 34px Georgia,"Times New Roman",serif; }
.language { font-size:12px; color:#54595d; }
.lead { margin:10px 0 16px; max-width:760px; }
.article-grid {
  display:grid; grid-template-columns:minmax(0,1fr) 280px;
  gap:24px; align-items:start;
}

.toc {
  width:260px; margin:12px 0 22px; border:1px solid #a2a9b1;
  background:#f8f9fa; padding:8px 12px; font-size:13px;
}
.toc-title { display:flex; justify-content:space-between; margin-bottom:4px; font-weight:bold; }
.toc ol { margin:4px 0 2px; padding-left:22px; }
.toc li { padding:1px 0; }
h2 {
  margin:26px 0 8px; border-bottom:1px solid #a2a9b1;
  font:normal 24px Georgia,"Times New Roman",serif;
}

.infobox {
  width:280px; border:1px solid #a2a9b1; border-collapse:collapse;
  background:#f8f9fa; font-size:13px; text-align:left;
}
.infobox .caption {
  background:#cee7f5; text-align:center; font-weight:bold; padding:7px;
}
.infobox th {
  width:92px; padding:6px 7px; background:#eef3f5;
  vertical-align:top;
}
.infobox td { padding:6px 7px; }
.infobox td,.infobox th { border-top:1px solid #c8ccd1; }
.profile-art {
  height:170px;
  background:
    radial-gradient(circle at 50% 38%,#fff 0 12%,transparent 13%),
    radial-gradient(ellipse at 50% 45%,#c9e2f4 0 27%,transparent 28%),
    linear-gradient(145deg,#eef7fd,#a9cae2);
  border-bottom:1px solid #c8ccd1; position:relative; overflow:hidden;
}
.profile-art::before {
  content:"蒼"; position:absolute; inset:20px 0 0; text-align:center;
  color:rgba(56,111,154,.28); font:bold 118px Georgia,serif;
}

.term-list { border-top:1px solid #c8ccd1; }
.term {
  display:grid; grid-template-columns:180px 1fr; gap:16px;
  padding:13px 0; border-bottom:1px solid #e6e6e6;
}
.term-name { font-weight:bold; }
.term-name ruby rt { font-size:9px; color:#72777d; }
.term p { margin:0; }
.term small { color:#72777d; }
.term-list h3 {
  margin:24px 0 0;
  padding:7px 0;
  border-bottom:1px solid #c8ccd1;
  color:#54595d;
  font-size:16px;
}
.notice {
  margin:18px 0; border:1px solid #a2a9b1; background:#fbfbfb;
  padding:9px 12px; font-size:13px;
}
.footer {
  margin-top:36px; border-top:1px solid #c8ccd1;
  padding-top:12px; color:#54595d; font-size:12px;
}

@media (max-width:900px) {
  .topbar { height:auto; padding:12px 16px; }
  .top-actions a { display:none; }
  .search-wrap { width:180px; }
  .page-tabs { margin-left:0; padding:0 16px; overflow-x:auto; }
  .layout { grid-template-columns:1fr; }
  .sidebar { display:none; }
  main { padding:16px 18px 40px; }
  .article-grid { grid-template-columns:1fr; }
  .infobox { width:100%; max-width:360px; grid-row:1; }
  .toc { width:100%; max-width:360px; }
  .term { grid-template-columns:1fr; gap:3px; }
}
@media (max-width:520px) {
  .brand-sub { display:none; }
  .brand-name { font-size:21px; }
  .brand-mark { width:38px; height:38px; font-size:24px; }
  .top-actions { gap:8px; }
  .search-wrap { width:135px; }
  h1 { font-size:27px; }
  .page-tabs a:nth-last-child(-n+2) { display:none; }
}
