body {
  padding: 10px;
  background: #eee;
}

.markdown-body {
  margin: 0 auto;
  max-width: 800px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.markdown-body .inline-image {
  display: inline-block;
}

/* Header & navigation */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #eaecef;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  font-size: 1.05em;
}

.site-header__brand:hover {
  text-decoration: none;
}

.site-header__brand img {
  width: 44px;
  height: 44px;
  display: block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.92em;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.breadcrumb {
  font-size: 0.85em;
  color: #57606a;
  margin: 0 0 16px;
}

.breadcrumb a {
  color: #57606a;
}

/* Galleries */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.gallery a {
  display: block;
  text-decoration: none;
}

.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  padding: 6px;
  box-sizing: border-box;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
  display: block;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.gallery a:hover img {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.gallery--auto img {
  aspect-ratio: auto;
  height: auto;
  padding: 0;
}

/* Drawing / image detail pages */
.image-subtitle {
  color: #57606a;
  font-size: 0.9em;
  margin-top: -10px;
  margin-bottom: 16px;
}

.image-figure {
  margin: 0 0 16px;
  text-align: center;
}

.image-figure img {
  max-height: 85vh;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
}

.image-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  margin-top: 20px;
  border-top: 1px solid #eaecef;
  font-size: 0.92em;
}

.image-nav__prev,
.image-nav__next {
  min-width: 0;
}

.image-nav__hint {
  color: #6e7781;
  font-size: 0.8em;
  text-align: center;
  margin: 4px 0 0;
}

/* Jump-to-date bar & utility pills */
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 18px;
  padding: 10px 12px;
  background: #f6f8fa;
  border: 1px solid #eaecef;
  border-radius: 6px;
  font-size: 0.88em;
}

.jump-nav__label {
  font-weight: 600;
  color: #57606a;
  margin-right: 4px;
}

.jump-nav a,
.jump-nav button {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #d0d7de;
  color: #0969da;
  text-decoration: none;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
}

.jump-nav a:hover,
.jump-nav button:hover {
  background: #eef2f7;
}

.tag-count {
  color: #6e7781;
  font-size: 0.88em;
}

@media (max-width: 520px) {
  body {
    padding: 0;
  }

  .markdown-body {
    padding: 14px;
    box-shadow: none;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
  }
}
