.library-featured { container: home-featured / inline-size; margin-bottom: var(--section-space); }
.featured-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-5); }
.featured-heading h2 { margin: 0; }
.featured-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-5); }
.featured-controls { display: flex; align-items: center; gap: var(--space-2); }
.featured-position { margin-right: var(--space-2); color: var(--muted); }
.featured-slides { overflow-x: auto; scroll-snap-type: x proximity; min-width: 0; }
.featured-track { display: flex; align-items: flex-start; gap: var(--space-5); }
.featured-project-card { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-areas: "media title" "media copy"; grid-template-rows: auto 1fr; gap: var(--space-4) var(--space-6); padding: var(--panel-padding); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
[data-featured-ready] .featured-slides { overflow: clip; scroll-snap-type: none; touch-action: pan-y pinch-zoom; }
.featured-project-media { grid-area: media; position: relative; display: flex; align-items: center; justify-content: center; align-self: start; min-width: 0; width: 100%; aspect-ratio: 4 / 3; max-height: 360px; overflow: hidden; border-radius: 6px; }
.featured-project-media > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.featured-project-header { grid-area: title; min-width: 0; }
.featured-project-header .project-creator { margin: 0 0 var(--space-4); }
.featured-project-title { margin: 0 0 var(--space-3); overflow-wrap: anywhere; }
.featured-project-details:empty { display: none; }
.featured-project-copy { grid-area: copy; display: flex; flex-direction: column; min-width: 0; }
.featured-description { margin: 0 0 var(--space-5); overflow-wrap: anywhere; }
.featured-project-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: auto; }
.featured-project-interactions { display: flex; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.featured-project-interactions form { margin: 0; }
.featured-project-interactions [data-project-like-status] { flex-basis: 100%; margin: 0; }
.featured-project-interactions [data-project-like-status]:empty { display: none; }
.featured-project-interactions .project-like-status-error { color: var(--error); }
.featured-project-card[hidden], .featured-project-picker[hidden], .featured-controls[hidden] { display: none; }
.featured-project-picker { display: flex; gap: var(--space-3); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding: 3px 3px var(--space-3); margin: var(--space-4) -3px 0; }
.featured-project-choice { display: flex; flex-direction: column; flex: 0 0 116px; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--muted); text-align: left; font: inherit; cursor: pointer; scroll-snap-align: start; }
.featured-project-cover { position: relative; display: block; aspect-ratio: 4 / 3; border: 2px solid transparent; border-radius: 5px; overflow: hidden; background: var(--surface); }
.featured-project-cover img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 4px; object-fit: contain; }
.featured-project-choice-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: var(--space-2); overflow-wrap: anywhere; }
.featured-project-choice[aria-pressed="true"] { color: var(--text); }
.featured-project-choice[aria-pressed="true"] .featured-project-cover { border-color: var(--cyan); }
.featured-project-choice:hover { color: var(--cyan); }
.featured-project-choice:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; border-radius: 5px; }
@container home-featured (max-width: 640px) {
    .featured-heading-actions { width: 100%; justify-content: space-between; gap: var(--space-3); }
    .featured-project-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "title" "copy"; grid-template-rows: auto; gap: var(--space-4); }
    .featured-project-choice { flex-basis: 96px; }
}
