html,
body {
  min-height: 100%;
  background: #54D98F;
}

body.custom {
  margin: 0;
  background: #54D98F;
  color: #3f4652;
}

#page-background {
  position: fixed;
  inset: 0;
  background: #54D98F;
  z-index: 0;
  pointer-events: none;
}

#page-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  background: #54D98F;
}

#wrap {
  box-sizing: border-box;
  padding: 12px 0 36px;
}

#content.updates-shell {
  box-sizing: border-box;
  width: min(1162px, calc(100vw - 32px));
  min-height: 0;
  margin: 0 auto;
  background: #fff;
  border: 10px solid #e5950c;
}

#content.updates-shell #main-full {
  width: auto;
  padding: 0;
}

#content.updates-shell .post {
  padding: 0;
}

#content.updates-shell .entry {
  box-sizing: border-box;
  width: 100%;
  padding: 32px 32px 36px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#content.updates-shell .entry p {
  margin: 0 0 18px;
  padding: 0;
  line-height: 1.55;
}

#content.updates-shell .entry strong {
  color: #4b8f62;
  font-weight: 700;
}

#content.updates-shell .entry hr {
  height: 1px;
  margin: 20px 0 36px;
  border: 0;
  background: #5d6570;
}

.updates-post-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  width: 100%;
  margin-bottom: 36px;
}

.updates-post-nav__links {
  min-width: 0;
}

.updates-post-nav time {
  color: #4f5967;
  white-space: nowrap;
}

.prose {
  box-sizing: border-box;
  width: 100%;
  max-width: 930px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(18px, 0.35vw + 14px, 20px);
  line-height: 1.55;
}

.prose > * {
  box-sizing: border-box;
  max-width: 100%;
}

.prose pre {
  overflow-x: auto;
}

.prose iframe,
.prose audio,
#updates-search-input {
  max-width: 100%;
}

.updates-index-content {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  font-size: 1.125rem;
}

.prose h2 {
  margin-top: 36px;
}

#content.updates-shell .entry .prose p:has(+ ul, + ol) {
  margin-bottom: 4px !important;
}

#content.updates-shell .entry :is(ul, ol) {
  margin-top: 0 !important;
  margin-bottom: 18px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1.55;
}

#content.updates-shell .entry ul {
  list-style-type: disc;
  padding-left: 28px;
}

#content.updates-shell .entry ol {
  list-style-type: decimal;
  padding-left: 28px;
}

#content.updates-shell .entry :is(ul, ol) li {
  padding: 2px 0;
  margin: 0;
  line-height: 1.55;
}

#content.updates-shell .entry li p {
  margin: 0 0 6px !important;
  line-height: 1.55;
}

#content.updates-shell .entry li p:last-child {
  margin-bottom: 0 !important;
}

#content.updates-shell .entry :is(ul, ol) ul {
  list-style-type: circle;
  margin-top: 2px !important;
  margin-bottom: 2px !important;
  padding-left: 22px;
}

#content.updates-shell .entry :is(ul, ol) ol {
  list-style-type: decimal;
  margin-top: 2px !important;
  margin-bottom: 2px !important;
  padding-left: 22px;
}

a[href*="/feed.xml"],
.rss-link {
  color: #DD4723;
  text-decoration: underline dotted #DD4723 !important;
  text-underline-offset: 3px;
}

a[href*="/feed.xml"]:hover,
.rss-link:hover {
  text-decoration: underline solid #DD4723 !important;
}

#content.updates-shell .entry p.updates-tags,
.updates-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 930px;
  margin: 64px auto 36px !important;
  padding: 0;
}

.updates-tag {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 4px;
  background: #ededed;
  color: #4f5967;
  line-height: 1.2;
}

.updates-tags-sep {
  display: inline-flex;
  align-items: center;
  color: #888;
  font-weight: normal;
  user-select: none;
  padding: 0 4px;
}

#content.updates-shell .entry .share-buttons,
.share-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

#content.updates-shell .entry .share-buttons a,
.share-buttons a {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  color: #ffffff !important;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

#content.updates-shell .entry .share-buttons a:hover,
.share-buttons a:hover {
  opacity: 0.9;
  text-decoration: none !important;
}

#content.updates-shell .entry .share-buttons a.share-btn--x,
.share-buttons a.share-btn--x {
  background: #000000;
}
#content.updates-shell .entry .share-buttons a.share-btn--x:hover,
.share-buttons a.share-btn--x:hover {
  background: #222222;
}

#content.updates-shell .entry .share-buttons a.share-btn--telegram,
.share-buttons a.share-btn--telegram {
  background: #2481cc;
}
#content.updates-shell .entry .share-buttons a.share-btn--telegram:hover,
.share-buttons a.share-btn--telegram:hover {
  background: #1c6ba8;
}

#content.updates-shell .entry .share-buttons a.share-btn--facebook,
.share-buttons a.share-btn--facebook {
  background: #1877f2;
}
#content.updates-shell .entry .share-buttons a.share-btn--facebook:hover,
.share-buttons a.share-btn--facebook:hover {
  background: #1462c7;
}

#content.updates-shell .entry p.updates-prev-post,
.updates-prev-post {
  box-sizing: border-box;
  max-width: 930px;
  margin: 44px auto 24px !important;
  padding: 16px 20px !important;
  border: 1px solid #e5950c;
  border-radius: 8px;
  background: #fffdf8;
  color: #4f5967;
  font-size: 1.15rem;
  line-height: 1.5;
  text-align: center;
}

.updates-prev-post a {
  font-weight: 600;
}

#content.updates-shell .entry p.updates-rss-footer,
.updates-rss-footer {
  max-width: 930px;
  margin: 24px auto 0 !important;
  padding: 0;
  color: #6d6257;
  font-size: 0.95rem;
}

/* Images: never overflow container, always fit width */
.prose img,
.prose video,
.prose figure,
.update-embed,
.update-embed img,
.update-embed video {
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
}

.prose figure,
.update-embed {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  overflow: hidden;
}

.prose img,
.update-embed img {
  display: block;
}

#content.updates-shell .entry .update-embed--youtube iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}

#content.updates-shell .entry .update-embed--youtube figcaption {
  margin-top: 6px;
  font-size: 0.8em;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  #wrap {
    padding: 8px 0 24px;
  }

  #content.updates-shell {
    width: calc(100% - 16px);
    border-width: 8px;
  }

  #content.updates-shell .entry {
    padding: 20px 16px 22px;
  }

  .updates-post-nav {
    display: block;
  }

  .updates-post-nav time {
    display: block;
    margin-top: 8px;
  }
}

#content ul.updates-index-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: black;
  line-height: 1.8;
}

#content ul.updates-index-list li.updates-index-item {
  margin-bottom: 8px;
  padding: 0;
  list-style: none;
  margin-left: 12px;
}

#content ul.updates-index-list li.updates-index-item.updates-index-item--new-month {
  margin-top: 6px;
}

#content ul.updates-index-list li.updates-index-year {
  margin: 23px 0 12px;
  padding: 0;
  list-style: none;
  color: black;
  font-size: 1.1rem;
  font-weight: 700;
}

#content ul.updates-index-list li.updates-index-year:first-child {
  margin-top: 0;
}

.updates-index-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
}

.updates-index-number,
.updates-index-date {
  color: #666;
}

.updates-index-date {
  display: inline-block;
  padding: 1px 6px;
  color: #fff;
  background: #2f4a36;
  border: 1px solid #1f3325;
  border-radius: 0;
  line-height: 1.3;
}

.updates-index-separator {
  display: inline-block;
  width: 0.45rem;
  color: transparent;
  user-select: none;
}

#content.updates-shell .updates-link,
#content.updates-shell .rss-link {
  color: #dd4723;
}

.updates-muted { color: #666; }
.updates-time-clock { color: #888; }
.updates-prev-date { color: #6d6257; font-size: 0.9em; }
.updates-text { color: #000; }

.updates-post-nav--index {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

#content.updates-shell .updates-pagination-footer {
  padding-top: 23px;
  text-align: center;
}

.updates-search-title { padding: 15px 0; }
#updates-search-input { font-size: 16px; padding: 8px; }
