html.page-yearend {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

.yearend-toolbar {
  position: sticky;
  top: var(--site-header-h);
  z-index: 35;
  margin: 0 -1rem 0.75rem;
  padding: 0.5rem 1rem 0.75rem;
  background: #fff;
}

.yearend-years {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.yearend-chips {
  margin-top: 0.625rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.25rem;
}

.filter-btn {
  flex-shrink: 0;
  border-radius: 9999px;
  border: 1px solid #e5e5e5;
  background: #fff;
  padding: 0.375rem 0.875rem;
  font-size: 13px;
  font-weight: 500;
  color: #737373;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.filter-btn:hover:not(.is-active) {
  border-color: #111;
  color: #111;
}

.filter-btn.is-active {
  border-color: #111;
  background: #111;
  color: #fff;
  font-weight: 600;
}

.chip-btn {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.025em;
  color: #a3a3a3;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.15s ease;
}

.chip-btn:hover:not(.is-active) {
  color: #000;
}

.chip-btn.is-active {
  font-weight: 600;
  color: #000;
}

.ye-section {
  margin-top: 2.5rem; /* 40px — 섹션 구분 */
  scroll-margin-top: calc(var(--site-header-h) + 5.75rem);
}

.ye-section:first-of-type {
  margin-top: 0.75rem;
}

.ye-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* 8px — 막대↔텍스트 */
  margin: 0 0 1rem; /* 16px — 카드와 간격 */
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #111;
}

.ye-heading-bar {
  display: block;
  flex-shrink: 0;
  width: 3px;
  height: 14px;
  background: #000;
  border-radius: 1px;
}

.ye-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.ye-grid + .ye-grid {
  margin-top: 0.75rem;
}

.ye-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ye-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.ye-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  border-radius: 0.75rem;
  background: #fff;
  color: inherit;
  transition: transform 0.2s ease;
}

@media (hover: hover) {
  .ye-card:hover {
    transform: translateY(-2px);
  }
}

.ye-card--wide {
  grid-column: 1 / -1;
}

.ye-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #f5f5f5;
}

.ye-card--wide img,
.ye-card--landscape img {
  aspect-ratio: 16 / 9;
}

.ye-grid--merged {
  grid-template-columns: minmax(0, 1fr);
}

.ye-merged-media {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ye-merged-media a {
  display: block;
  min-width: 0;
}

.ye-card--merged .ye-card-body {
  text-align: center;
}

.ye-card--square img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f5f5f5;
}

.ye-card--contain img {
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
}

.ye-card--poster img {
  aspect-ratio: auto;
  height: auto;
}

.ye-card--focus-right img {
  object-position: right center;
}

.ye-card--focus-left img {
  object-position: left center;
}

.ye-card--focus-top img {
  object-position: center top;
}

.ye-card-desc {
  margin: 0.35rem 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: #737373;
  word-break: keep-all;
}

.ye-card-date {
  margin: 0 0 0.2rem;
  font-family: Oswald, Pretendard, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #888;
}

.ye-card-body {
  min-width: 0;
  padding: 0.625rem 0.75rem 0.75rem;
}

.ye-card-title {
  display: block;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: inherit;
}

.ye-card-links {
  margin: 0.375rem 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #737373;
}

.ye-card-links a {
  color: #737373;
  white-space: nowrap;
}

.ye-card-links a:hover {
  color: #111;
  text-decoration: underline;
}

.ye-notes {
  margin: 2.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ye-note-item {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.ye-note-item a {
  color: #525252;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ye-note-item a:hover {
  color: #111;
}

.ye-banner-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .ye-banner-card:hover {
    transform: translateY(-2px);
    border-color: #111;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  .ye-banner-card:hover .ye-banner-arrow {
    transform: translateX(3px);
    color: #111;
  }
}

.ye-banner-body {
  min-width: 0;
  flex: 1;
}

.ye-banner-badge {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.15rem 0.45rem;
  font-family: Oswald, Pretendard, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  background: #111;
  border-radius: 4px;
  line-height: 1.3;
}

.ye-banner-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: #111;
}

.ye-banner-desc {
  margin: 0.25rem 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: #737373;
  word-break: keep-all;
}

.ye-banner-arrow {
  flex-shrink: 0;
  font-size: 18px;
  color: #a3a3a3;
  transition: transform 0.2s ease, color 0.2s ease;
}

.ye-hint {
  margin: 2.5rem 0 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.625;
  color: #a3a3a3;
}

@media (min-width: 768px) {
  .ye-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }

  .ye-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ye-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ye-grid--merged {
    grid-template-columns: minmax(0, 1fr);
  }

  .ye-grid + .ye-grid {
    margin-top: 1rem;
  }

  .ye-card--contain img {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    object-fit: contain;
    background: #f5f5f5;
  }

  .ye-grid:has(> .ye-card--poster:only-child) {
    container-type: inline-size;
  }

  .ye-grid > .ye-card--poster:only-child {
    justify-self: center;
  }

  .ye-grid > .ye-card--poster:only-child img {
    width: auto;
    max-width: 100%;
    height: calc(100cqw * 9 / 16);
  }
}
