.custom-header {
  background-color: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 20;
}

.custom-header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.custom-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--md-default-fg-color) !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}

.custom-brand__icon svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: var(--md-accent-fg-color);
  display: block;
}

.custom-nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.custom-nav__link {
  color: var(--md-default-fg-color--light) !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.custom-nav__link:hover {
  color: var(--md-accent-fg-color) !important;
}

.custom-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  color: var(--md-default-fg-color--light);
}

.custom-icon-btn:hover {
  background-color: var(--md-default-fg-color--lightest);
  color: var(--md-default-fg-color);
}

.custom-icon-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.custom-palette {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

/* 사이드바 제거 및 중앙 피드 집중 */
.md-sidebar--primary,
.md-sidebar--secondary {
  display: none;
}

.md-main__inner {
  max-width: 960px;
  margin: 0 auto;
  padding-top: 0.6rem;
}

.md-content__inner {
  margin: 0 auto;
  padding-top: 0.2rem;
}

.md-typeset {
  font-size: 0.94rem;
  line-height: 1.6;
}

.md-typeset h1 {
  margin: 0 0 0.6rem 0;
  font-size: 1.7rem;
}

.post-item {
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.post-item:last-child {
  border-bottom: none;
}

.post-item h3 {
  margin: 0 0 0.32rem 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
}

.post-item h3 a {
  color: var(--md-default-fg-color);
  text-decoration: none;
}

.post-item h3 a:hover {
  color: var(--md-accent-fg-color);
}

.post-item p {
  margin: 0 0 0.35rem 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--md-default-fg-color--light);
}

.post-readmore {
  display: inline-block;
  margin-bottom: 0.42rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--md-accent-fg-color);
  text-decoration: none;
}

.post-readmore:hover {
  text-decoration: underline;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--md-default-fg-color--lighter);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.post-tag {
  background-color: var(--md-default-fg-color--lightest);
  color: var(--md-default-fg-color--light);
  padding: 0.12rem 0.5rem;
  border-radius: 3px;
  font-size: 0.78rem;
}

@media screen and (max-width: 640px) {
  .custom-header__inner {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .custom-nav {
    gap: 0.75rem;
    flex-wrap: wrap;
  }
}

/* 2단계: 독립 검색 모달 및 노란 하이라이트 */
.md-search {
  display: none !important;
}

.angelo-search-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background-color: rgba(0, 0, 0, 0.72);
  overflow-y: auto;
  padding: 2.5rem 1.25rem;
}

.angelo-search-modal__inner {
  max-width: 720px;
  margin: 0 auto;
}

.angelo-search-modal__title {
  color: #ffffff;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  text-align: left;
}

.angelo-search-modal__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.angelo-search-modal__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  border: 2px solid #ffffff;
  background-color: rgba(25, 25, 25, 0.92);
  color: #ffffff;
  font-size: 0.96rem;
}

.angelo-search-modal__input::placeholder {
  color: #cbd5e1;
}

.angelo-search-modal__input:focus {
  outline: none;
  background-color: #111111;
}

.angelo-search-modal__cancel {
  flex: 0 0 auto;
  height: 2.75rem;
  padding: 0 1.4rem;
  border-radius: 999px;
  border: none;
  background-color: #ffffff;
  color: #111111;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.angelo-search-modal__cancel:hover {
  background-color: #e5e7eb;
}

.angelo-search-modal__results {
  margin-top: 1.2rem;
  background-color: #ffffff;
  color: #111111;
  border-radius: 8px;
  max-height: 60vh;
  overflow-y: auto;
}

.angelo-search-modal__results:empty {
  display: none;
}

.angelo-search-item {
  display: block;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid #e5e7eb;
  text-decoration: none;
  color: #111111;
}

.angelo-search-item:last-child {
  border-bottom: none;
}

.angelo-search-item:hover {
  background-color: #f3f4f6;
}

.angelo-search-item__title {
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 0.2rem;
}

.angelo-search-item__snippet {
  font-size: 0.84rem;
  color: #4b5563;
  line-height: 1.45;
}

.angelo-search-empty {
  padding: 1rem 1.1rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.angelo-search-highlight {
  background-color: #fef08a;
  color: #111827;
  padding: 0.05rem 0.15rem;
  border-radius: 2px;
  font-weight: 700;
}

/* 홈 화면의 자동 Posts h1 및 본문 내 중복 h1이 있을 때 상단 첫 번째 자동 h1 숨김 */
.md-content__inner:has(.angelo-home-feed) > h1:first-of-type,
.md-content__inner:has(h1:nth-of-type(2)) > h1:first-of-type {
  display: none;
}

/* v0.2-1: 카드 우측 날짜 표기 및 메타 줄 정렬 */
.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--md-default-fg-color--lighter);
}

.post-date {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--md-default-fg-color--light);
}

/* 달력 아이콘 + 영문 날짜 표기 정렬 */
.post-date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--md-default-fg-color--lighter);
}

.post-date__icon {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
  flex-shrink: 0;
}

/* v0.2-2: 참조 사이트 스타일 원형 페이지네이션 */
.angelo-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 2.25rem 0 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  user-select: none;
}

.angelo-pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--md-default-fg-color--lightest);
  color: var(--md-default-fg-color);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, color 0.15s ease;
}

.angelo-pagination__btn:hover:not(:disabled) {
  background: rgba(229, 9, 20, 0.12);
  color: #e50914;
  transform: translateY(-1px);
}

.angelo-pagination__btn.is-active {
  background: #e50914;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.28);
}

.angelo-pagination__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.angelo-pagination__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.2rem;
  color: var(--md-default-fg-color--light);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.angelo-pagination__summary {
  width: 100%;
  text-align: center;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--md-default-fg-color--lighter);
}
