:root {
  --ink: #1a1a1a;
  --ink-soft: #5a6570;
  --paper: #e8f0f6;
  --paper-2: #ffffff;
  --rule: #d3e0ea;
  --blue: #1f4e79;
  --blue-soft: #d7e6f4;
  --blue-deep: #0e2f4d;
  --accent: #c45c26;
  --bubble: #dceef8;
  --max: 1140px;
  --sidebar: 18.5rem;
  --gutter: 1.5rem;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 17px;
  line-height: 1.85;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

.shell,
.site-header-inner,
.article-layout {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

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

.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem 0;
}

.site-logo {
  flex: none;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--blue-deep);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.2rem 1.1rem;
  font-size: 0.88rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--blue);
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  margin: 0 -0.4rem 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue-deep);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.2rem;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.nav-toggle-bars {
  position: relative;
  margin: 0 auto;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-footer {
  margin-top: 1.5rem;
  padding: 1.6rem 0 2.2rem;
  border-top: 1px solid var(--rule);
  background: #fff;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.site-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

.footer-nav a {
  color: var(--ink);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--blue);
}

.footer-copy {
  margin: 0;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar);
  gap: 2rem;
  align-items: start;
  padding: 1.4rem 0 3rem;
}

.sidebar {
  position: sticky;
  top: 1rem;
  align-self: start;
  width: var(--sidebar);
}

.side-search {
  margin-bottom: 1.4rem;
}

.side-search input {
  width: 100%;
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: 2px;
  padding: 0.45rem 0.55rem;
  font: inherit;
}

.side-search button {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  border: 0;
  border-radius: 2px;
  padding: 0.45rem;
  background: var(--blue);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.side-section {
  margin-bottom: 1.6rem;
}

.side-section h2 {
  position: relative;
  margin: 0 0 0.8rem;
  padding-bottom: 0.4rem;
  font-size: 1.02rem;
  font-weight: 700;
  border-bottom: 3px solid #c5d4e3;
}

.side-section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 5.2rem;
  height: 3px;
  background: var(--blue);
}

.side-popular,
.side-banners {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-popular a,
.side-banners a {
  display: block;
  margin-bottom: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
}

.side-popular img,
.side-banners img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0.4rem;
  background: #fff;
}

.side-banners a {
  margin-bottom: 0.7rem;
}

.side-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-posts li {
  border-bottom: 1px solid var(--rule);
}

.side-posts a {
  display: grid;
  grid-template-columns: 5.6rem 1fr;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 0;
  color: var(--ink);
  text-decoration: none;
}

.side-posts a:hover .side-posts-title {
  color: var(--blue);
}

.side-posts img {
  width: 5.6rem;
  height: auto;
  display: block;
  border-radius: 4px;
  border: 1px solid var(--rule);
  background: #fff;
}

.side-posts-ph {
  width: 5.6rem;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  border: 1px solid var(--rule);
  background: #fff;
}

.side-posts-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.side-posts-title {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.45;
}

.side-posts-date {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 400;
}

.member-cta {
  position: fixed;
  right: -320px;
  bottom: 20px;
  width: 300px;
  z-index: 40;
  transition: right 0.5s ease-in-out;
}

.member-cta.is-visible {
  right: 20px;
}

.member-cta img {
  display: block;
  width: 100%;
  height: auto;
}

.member-cta-close {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 18px;
  line-height: 28px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .member-cta {
    display: none;
  }
}

.page {
  padding: 1.4rem 0 3rem;
}

.hero {
  padding: 0.6rem 0 0.4rem;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.6rem;
}

.hero p {
  margin: 0;
  color: var(--ink-soft);
}

.group {
  margin: 2rem 0;
}

.group h2 {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--blue);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.35rem;
  margin: 0 0 0.8rem;
}

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

.article-list li {
  border-bottom: 1px solid var(--rule);
}

.article-list a {
  display: block;
  padding: 0.7rem 0;
  color: var(--ink);
  text-decoration: none;
}

.article-list a:hover {
  color: var(--blue);
}

.article-list .meta {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.post-list > li {
  border-bottom: 1px solid var(--rule);
}

.post-card a {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  color: var(--ink);
  text-decoration: none;
}

.post-card a:hover h2 {
  color: var(--blue);
}

.post-card img,
.post-card-ph {
  width: 10.5rem;
  display: block;
  border-radius: 4px;
  border: 1px solid var(--rule);
  background: #fff;
}

.post-card img {
  height: auto;
}

.post-card-ph {
  aspect-ratio: 16 / 9;
}

.post-card-body {
  min-width: 0;
}

.post-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.post-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 0.4rem;
}

.post-card-excerpt {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.7;
}

.listing-empty {
  color: var(--ink-soft);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
}

.pagination ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 2rem;
  justify-content: center;
  padding: 0.3rem 0.55rem;
  border-radius: 4px;
  text-decoration: none;
}

.pagination a {
  color: var(--blue);
}

.pagination a:hover {
  background: var(--blue-soft);
}

.pagination [aria-current='page'] {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.pagination-disabled {
  color: var(--ink-soft);
}

.site-search {
  --pagefind-ui-scale: 0.92;
  --pagefind-ui-primary: var(--blue);
  --pagefind-ui-text: var(--ink);
  --pagefind-ui-background: #fff;
  --pagefind-ui-border: var(--rule);
  --pagefind-ui-tag: var(--blue-soft);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 4px;
  --pagefind-ui-image-border-radius: 4px;
  --pagefind-ui-image-box-ratio: 16 / 9;
  --pagefind-ui-font: inherit;
  margin: 0.4rem 0 1.5rem;
}

.article-wrap {
  min-width: 0;
}

.article-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.9rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}

.article-cat {
  display: inline-block;
  background: #dfe5ea;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.12rem 0.7rem;
  font-size: 0.75rem;
}

.article-wrap > h1 {
  font-weight: 700;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  line-height: 1.45;
  margin: 0 0 1.4rem;
}

.article :where(h2, h3, h4) {
  line-height: 1.45;
  margin: 2.2rem 0 0.7rem;
}

.article h2 {
  font-size: 1.28rem;
  padding-left: 0.7rem;
  border-left: 3px solid var(--blue);
}

.article h3 {
  font-size: 1.08rem;
}

.article p,
.article li,
.article :where(h2, h3, h4) {
  overflow-wrap: anywhere;
}

.article ul,
.article ol {
  padding-left: 1.3rem;
}

.article p:empty,
.article a[href*="px.a8.net"]:empty {
  display: none;
}

.has-medium-font-size {
  font-size: 1.02em;
}

.wp-block-spacer {
  height: 0.75rem !important;
}

.wp-block-spacer + .wp-block-spacer {
  display: none;
}

.wp-block-group:has(> figure.wp-block-image) {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.wp-block-group:has(> figure.wp-block-image) > figure {
  margin: 0;
  flex: 1 1 14rem;
}

.hcb_wrap {
  margin: 1.2rem 0;
}

.wp-block-embed.is-type-wp-embed .wp-block-embed__wrapper {
  padding: 0.85rem 1rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.article img {
  max-width: 100%;
  height: auto;
}

.article figure {
  margin: 1.4rem 0;
}

.article figcaption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

.article pre,
.article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}

.article pre {
  overflow-x: auto;
  background: var(--blue-deep);
  color: #eef4fa;
  padding: 1rem;
  border-radius: 8px;
}

.article :not(pre) > code {
  background: var(--blue-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.article table {
  display: block;
  border-collapse: collapse;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  font-size: 0.92rem;
  margin: 1.2rem 0;
}

.article th,
.article td {
  border: 1px solid var(--rule);
  padding: 0.45rem 0.6rem;
  background: var(--paper-2);
}

.article mark {
  background: #f4d9b0;
  padding: 0 0.15em;
}

.wp-block-embed__wrapper iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 8px;
}

/* Speech bubble: 管理人 */
.vk_balloon {
  display: grid;
  grid-template-columns: 4.4rem 1fr;
  gap: 0.7rem;
  align-items: start;
  margin: 1.6rem 0;
}

.vk_balloon_icon {
  text-align: center;
}

.vk_balloon_icon figure {
  margin: 0;
}

.vk_balloon_icon_image {
  width: 3.6rem;
  height: 3.6rem;
  object-fit: cover;
  border-radius: 50%;
  background: var(--blue-soft);
}

.vk_balloon_icon_name {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.vk_balloon_content {
  position: relative;
  background: var(--bubble);
  border-radius: 14px;
  padding: 0.85rem 1rem 0.7rem;
}

.vk_balloon_content > p {
  margin: 0.35rem 0;
}

.vk_balloon_content_before {
  position: absolute;
  left: -7px;
  top: 1.1rem;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 8px 7px 0;
  border-color: transparent var(--bubble) transparent transparent;
}

.vk_balloon_content_after {
  display: none;
}

/* Point / callout */
.vk_borderBox {
  position: relative;
  margin: 1.8rem 0 1.4rem;
  padding: 1.55rem 1.1rem 0.85rem;
  background: var(--paper-2);
  border: 1px solid var(--blue);
  border-radius: 8px;
}

.vk_borderBox_title_container {
  position: absolute;
  top: -0.7rem;
  left: 0.9rem;
  background: var(--blue);
  color: #fff;
  padding: 0.12rem 0.7rem;
  border-radius: 4px;
}

.vk_borderBox_title_container i {
  display: none;
}

.vk_borderBox_title {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: #fff;
}

.vk_borderBox_body p {
  margin: 0.3rem 0;
}

.vk_alert {
  margin: 1.4rem 0;
  padding: 0.9rem 1rem;
  background: #eef4fa;
  border-left: 4px solid var(--blue);
  border-radius: 0 8px 8px 0;
}

.vk_alert.alert-warning {
  background: #f3ebe1;
  border-left-color: var(--accent);
}

.vk_alert_icon_text,
.vk_alert_content p {
  margin: 0.25rem 0;
}

.has-pale-cyan-blue-background-color {
  background: var(--bubble);
}

.has-text-align-center {
  text-align: center;
}

mjx-container {
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

mjx-container[display="true"] {
  display: block;
}

@media (max-width: 960px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    width: 100%;
    top: auto;
  }
}

@media (max-width: 800px) {
  .site-header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 0.15rem 0 0.5rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    display: block;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--rule);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .post-card a {
    grid-template-columns: 1fr;
  }

  .post-card img,
  .post-card-ph {
    width: 100%;
  }

  .vk_balloon {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .vk_balloon_icon {
    text-align: left;
  }

  .vk_balloon_icon figure {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .vk_balloon_icon_name {
    margin-top: 0;
  }

  .vk_balloon_content_before {
    left: 1.1rem;
    top: -7px;
    border-width: 0 7px 8px 7px;
    border-color: transparent transparent var(--bubble) transparent;
  }
}
