.blog { max-width: 90rem; margin: auto; padding: 1.4rem clamp(1rem, 4vw, 4rem) 4rem; color: #f5efdf; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif; }
.blog-banner { display: block; width: 100%; height: auto; }
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 27%); gap: clamp(1.25rem, 3.6vw, 3.25rem); margin-top: 1.7rem; }
.blog-main, .blog-article { min-width: 0; }
.blog-article, #archive { scroll-margin-top: 8rem; }
.blog-article > time { display: inline-block; padding-bottom: .28rem; border-bottom: 2px solid #68ccda; }
.blog h1 { font-size: clamp(1.125rem, 2.15vw, 1.375rem); line-height: 1.3; margin: .55rem 0 .85rem; overflow-wrap: anywhere; }
.blog-body { font-size: 1rem; line-height: 1.55; overflow-wrap: anywhere; }
.blog-body p { margin-block: .15em; }
.blog-body img { display: inline-block; max-width: 100%; height: auto; vertical-align: middle; }
.blog-body pre, .blog-body table { display: block; max-width: 100%; overflow: auto; }
.blog-body a, .original-post { color: #aeddff; text-underline-offset: .18em; }
.original-post { display: inline-block; margin-top: 1rem; }
.blog-sidebar { min-width: 0; border-left: 1px solid #687688; padding-left: clamp(1rem, 2.7vw, 2rem); }
.blog-sidebar section + section { margin-top: 1.8rem; }
.blog-sidebar h2 { margin: 0; padding-bottom: .45rem; border-bottom: 1px solid #f5efdf; font-size: 1.4rem; }
.blog-sidebar ul, .book-cards { list-style: none; padding: 0; margin: 0; }
.blog-sidebar li { border-bottom: 1px solid #687688; }
.blog-sidebar li a { display: grid; grid-template-columns: auto 1fr; gap: .65rem; padding: .62rem 0; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.blog-sidebar time { font-size: .85rem; color: #d6dce6; }
.blog-sidebar a:hover span { text-decoration: underline; }
.blog-sidebar a[aria-current="page"] span { border-left: .2rem solid #68ccda; padding-left: .45rem; }
.archive-picker { display: block; margin-top: .8rem; }
.archive-picker select { width: 100%; min-height: 44px; padding: .4rem .55rem; border: 1px solid #a5b1c2; border-radius: .25rem; background: #0b1933; color: inherit; font: inherit; }
.book-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1.8rem; padding-top: 1.35rem; border-top: 1px solid #687688; }
.book-cards a { display: flex; gap: .6rem; align-items: center; height: 100%; padding: .8rem; border: 1px solid #687688; border-radius: .5rem; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.book-cards a:hover { background: #172744; }
.book-cards img { flex: 0 1 40%; width: 40%; min-width: 0; height: auto; object-fit: contain; }
.book-amazon { display: block; margin-top: .45rem; color: #f9cf71; font-size: .875rem; }
@media (max-width: 720px) {
  .blog-layout { grid-template-columns: minmax(0, 1fr); }
  .blog-sidebar { border-left: 0; border-top: 1px solid #687688; padding: 1.25rem 0 0; }
  .book-cards { grid-template-columns: 1fr; }
  .book-cards img { width: 54px; flex-basis: 54px; }
}

.blog-body [data-image-preview] { cursor: zoom-in; }
.blog-body button[data-image-preview] { padding: 0; border: 0; background: transparent; }
html:has(.blog-image-viewer[open]) { overflow: hidden; }
.blog-image-viewer { box-sizing: border-box; max-width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); padding: .75rem; border: 0; border-radius: .5rem; background: #0b1933; color: #fff; }
.blog-image-viewer::backdrop { background: rgb(0 0 0 / 82%); }
.blog-image-viewer form { display: flex; justify-content: flex-end; margin: 0 0 .6rem; }
.blog-image-viewer button { min-height: 44px; padding: .45rem .9rem; font: inherit; cursor: pointer; }
.blog-image-viewer img { display: block; max-width: 100%; max-height: calc(100dvh - 6rem); margin: auto; object-fit: contain; }

.article-search-form { display: flex; gap: .5rem; margin-top: .8rem; }
.article-search-form input { box-sizing: border-box; flex: 1; min-width: 0; min-height: 44px; padding: .5rem .65rem; border: 1px solid #a5b1c2; border-radius: .25rem; background: #0b1933; color: inherit; font: inherit; }
.article-search-form button { min-height: 44px; padding: .45rem .9rem; border: 1px solid #a5b1c2; border-radius: .25rem; background: #193253; color: inherit; font: inherit; cursor: pointer; }
.article-search-form button:hover { background: #25456b; }
.article-search-count, .article-search-empty { margin: .75rem 0 .35rem; color: #d6dce6; }
.blog-body :is(.twitter-tweet,.twitter-tweet-rendered,twitter-widget,iframe[src*="platform.twitter.com/embed"],iframe[src*="twitter.com/widgets"],iframe[src*="platform.x.com/embed"]){width:550px!important;max-width:100%!important;box-sizing:border-box;margin-inline:0!important}
.blog-body .twitter-tweet iframe{max-width:100%!important}
