.post-content figure.highlight,
.post-code-block {
  position: relative;
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid #353b45;
  border-radius: 10px;
  background: #282c34;
  box-shadow: 0 8px 24px rgba(15, 18, 24, 0.12);
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px 0 14px;
  background: #21252b;
  border-bottom: 1px solid #353b45;
  user-select: none;
}

.code-toolbar-meta,
.code-toolbar-actions {
  display: flex;
  align-items: center;
}

.code-toolbar-meta {
  min-width: 0;
  gap: 12px;
}

.code-toolbar-actions {
  flex-shrink: 0;
  gap: 7px;
}

.code-window-dots {
  display: inline-flex;
  gap: 6px;
}

.code-window-dots i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-window-dots i:nth-child(1) {
  background: #ff5f56;
}

.code-window-dots i:nth-child(2) {
  background: #ffbd2e;
}

.code-window-dots i:nth-child(3) {
  background: #27c93f;
}

.code-info {
  overflow: hidden;
  color: #9da5b4;
  font: 500 11px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.code-toolbar button {
  padding: 3px 10px;
  color: #abb2bf;
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
  background: #2c313a;
  border: 1px solid #3e4451;
  border-radius: 6px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.code-toolbar button:hover {
  color: #fff;
  background: #353b45;
  border-color: #61afef;
}

.code-toolbar button:focus-visible {
  outline: 2px solid #61afef;
  outline-offset: 2px;
}

.post-code-block {
  color: #abb2bf;
}

.post-content .post-code-block pre,
.post-content figure.highlight pre {
  margin: 0;
  border-radius: 0;
  background: #282c34;
}

.post-content .post-code-block pre code,
.post-content figure.highlight pre code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.65;
  tab-size: 4;
}

.code-viewport {
  overflow: auto;
  background: #282c34;
  scrollbar-color: #5c6370 #282c34;
  scrollbar-width: thin;
}

.code-viewport-limited {
  max-height: 360px;
  overscroll-behavior: contain;
}

.code-viewport > table {
  min-width: 100%;
  margin: 0;
}

.code-viewport::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.code-viewport::-webkit-scrollbar-thumb {
  background: #5c6370;
  border: 2px solid transparent;
  border-radius: 8px;
  background-clip: padding-box;
}

.code-viewport::-webkit-scrollbar-thumb:hover {
  background: #737b8c;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.code-viewport::-webkit-scrollbar-track {
  background: #282c34;
}

@media (max-width: 640px) {
  .post-content figure.highlight,
  .post-code-block {
    margin: 18px 0;
    border-radius: 8px;
  }

  .code-toolbar {
    padding: 0 8px 0 10px;
  }

  .code-info {
    max-width: 90px;
  }

  .code-toolbar button {
    padding: 3px 8px;
  }
}
