html { background: #F5F0E8; }
body { -webkit-font-smoothing: antialiased; }

.code-block {
  background: #1A1612;
  border: 1px solid rgba(120, 100, 75, 0.15);
}
.code-block code { color: #E8E0D4; }
.code-keyword { color: #E4A47A; }
.code-string { color: #A8C69F; }
.code-comment { color: #7A6E5C; }
.code-type { color: #9DBAD7; }

.sidebar-link {
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}
.sidebar-link:hover {
  color: #1A1612;
  border-left-color: rgba(120, 100, 75, 0.3);
}
.sidebar-link.active {
  color: #C4673A;
  border-left-color: #C4673A;
  font-weight: 600;
}
.sidebar-link.sub {
  padding-left: 1.75rem;
  font-size: 0.8125rem;
}

.prompt-card {
  transition: all 0.25s ease;
  border: 1px solid rgba(120, 100, 75, 0.12);
}
.prompt-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(26, 22, 18, 0.06);
  border-color: rgba(120, 100, 75, 0.22);
}

/* Prompt 模板区：单列自适应高度布局 */
.prompt-masonry {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.prompt-item {
  width: 100%;
  margin: 0;
}

.golden-rule {
  background: linear-gradient(135deg, #F5ECD7 0%, #EDDCB5 100%);
  border: 1px solid #D4BA82;
}

details summary::-webkit-details-marker { display: none; }
details summary { list-style: none; }

.phase-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* 可访问性：统一焦点态 */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #C4673A;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* 可访问性：提升浅色正文对比度 */
.text-warm-400 {
  color: #6B5D4B !important;
}

/* 右下角返回顶部按钮 */
.back-to-top-btn {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1A1612;
  color: #F5F0E8;
  border: 1px solid rgba(120, 100, 75, 0.25);
  box-shadow: 0 8px 24px rgba(26, 22, 18, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s ease;
  z-index: 50;
}
.back-to-top-btn:hover {
  background: #C4673A;
  transform: translateY(-1px);
}
.back-to-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .sidebar-nav { display: none !important; }
  .main-content { margin-left: 0 !important; }
}

@media (max-width: 640px) {
  .back-to-top-btn {
    right: 1rem;
    bottom: 1rem;
  }
}
