:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  color: #292836;
  background: #f2f2f7;
  --link: #3f4380;
  --hover: #8a3467;
  --muted: #605d70;
  --border: #dddde9;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.7; overflow-wrap: anywhere; }
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover, a:focus-visible { color: var(--hover); }
img, video, iframe { max-width: 100%; }
img, video { height: auto; }
pre { white-space: pre-wrap; }

.site-header {
  background: #e7e8f3;
  border-bottom: 1px solid #d3d4e6;
  padding: 1.45rem 0;
}
.site-header p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.875rem; }
.site-name { font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 700; text-decoration: none; }
.site-frame { width: min(100%, 69rem); margin-inline: auto; padding-inline: 1rem; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 1.25rem; margin-block: 1.25rem; }
.columns:has(> main:only-child) { grid-template-columns: minmax(0, 1fr); }

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  padding: 1rem 1.2rem;
  margin: 0 0 0.9rem;
}
.panel h1, .panel h2, .archive-title { margin: 0 0 0.35rem; line-height: 1.45; }
.panel h1, .archive-title { font-size: 1.45rem; }
.panel h2 { font-size: 1.12rem; }
.archive-title { margin-block-end: 0.85rem; }
.entry-state { display: flex; flex-wrap: wrap; gap: 0.15rem 0.9rem; color: var(--muted); font-size: 0.875rem; }
.preview-text { margin: 0.65rem 0 0; }
.entry-body { margin-block-start: 1.15rem; }
.sidebar ul, .entry-links { margin: 0.4rem 0 0; padding-inline-start: 1.25rem; }
.sidebar li, .entry-links li { margin-block: 0.25rem; }
.sidebar { font-size: 0.9rem; }
.sidebar summary { cursor: pointer; font-weight: 700; }
.comments { list-style: none; margin: 0; padding: 0; }
.comments li { border-top: 1px solid var(--border); padding: 0.65rem 0; }
.comments time { color: var(--muted); margin-inline-start: 0.65rem; font-size: 0.85rem; }
.comment-body { white-space: pre-wrap; }
.pager { display: flex; gap: 0.75rem; justify-content: space-between; }
.pager a { background: #fff; border: 1px solid var(--border); border-radius: 0.25rem; padding: 0.5rem 0.8rem; }
.entry-pager span { display: block; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; padding-block: 1rem; font-size: 0.875rem; }
.ad:has(> :not(script)) { margin-block: 0.65rem; }
.mobile-only, .ad-mobile { display: none; }

@media (max-width: 767px) {
  .site-header { padding: 0.85rem 0; }
  .columns { display: block; padding-inline: 0; margin-top: 0.5rem; }
  .panel { border-inline: 0; border-radius: 0; padding: 0.85rem 1rem; margin-bottom: 0.5rem; }
  .archive-title, .pager { padding-inline: 1rem; }
  .entry-preview h2 { font-size: 1.05rem; }
  .entry-preview .preview-text, .desktop-only, .ad-desktop { display: none; }
  .mobile-only, .ad-mobile { display: block; }
  .sidebar { margin-top: 0.9rem; }
}
