.home-feed {
    --feed-accent: #4a286d;
    --feed-active: #281944;
    --feed-active-text: #fff;
    --feed-date: #f3ecfa;
    background: var(--page);
    color: var(--text);
    padding-block: clamp(2.6rem, 5vw, 4.75rem);
}
[data-theme=dark] .home-feed {
    --feed-accent: #e2c9fc;
    --feed-active: #e2c9fc;
    --feed-active-text: #211333;
    --feed-date: #302344;
}
.home-feed [hidden] { display: none !important; }
.home-feed-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.2rem;
}
.home-feed-header h2 { font-size: clamp(1.65rem, 3.45vw, 2.85rem); line-height: 1.12; }
.home-feed-tabs { display: flex; gap: .35rem; flex-wrap: wrap; }
.home-feed-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 2.55rem;
    padding: .4rem .78rem;
    border: 1px solid var(--line);
    border-radius: .55rem;
    color: var(--text);
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
}
.home-feed-tabs a:hover { background: var(--surface); color: var(--feed-accent); }
.home-feed-tabs a.is-active { background: var(--feed-active); color: var(--feed-active-text); border-color: var(--feed-active); }
.home-feed-tabs svg, .home-feed-cover svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
    width: 1.05rem;
    height: 1.05rem;
}
.home-feed-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3rem) / 4);
    grid-template-rows: 1fr;
    gap: 1rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
    padding-bottom: .65rem;
}
.home-feed-track.is-draggable, .home-feed-track.is-draggable a { cursor: grab; }
.home-feed-track.is-dragging { scroll-snap-type: none; user-select: none; }
.home-feed-track.is-dragging, .home-feed-track.is-dragging a { cursor: grabbing; }
.home-feed-card {
    min-width: 0;
    scroll-snap-align: start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: .8rem;
    overflow: hidden;
}
.home-feed-card-link { display: block; height: 100%; color: inherit; -webkit-user-drag: none; }
.home-feed-card-link:hover h3 { color: var(--feed-accent); text-decoration: underline; text-underline-offset: .15em; }
.home-feed-card-link:focus-visible { outline-offset: -3px; }
.home-feed-cover {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    background: var(--feed-date);
    color: var(--feed-accent);
}
.home-feed-cover svg { width: 2.45rem; height: 2.45rem; opacity: .68; }
.home-feed-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-feed-instagram .home-feed-cover, .home-feed-tiktok .home-feed-cover { aspect-ratio: 4 / 5; }
.home-feed-cover [data-feed-cover-video] { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; visibility: hidden; }
.home-feed-cover [data-feed-cover-video].has-frame { visibility: visible; }
.home-feed-ig-play {
    position: absolute;
    display: grid;
    place-items: center;
    width: 2.85rem;
    height: 2.85rem;
    inset-inline-end: .66rem;
    top: .66rem;
    border-radius: 50%;
    background: #1d1333bc;
    color: white;
}
.home-feed-ig-play svg { width: 1.25rem; height: 1.25rem; fill: currentColor; stroke: none; opacity: 1; }
.home-feed-media-count {
    position: absolute;
    inset-inline-end: .55rem;
    bottom: .55rem;
    color: #fff;
    background: #1d1333e8;
    border-radius: .32rem;
    padding: .2rem .5rem;
    font-size: .71rem;
    font-weight: 700;
}
.home-feed-card-content { padding: .8rem .9rem 1rem; }
.home-feed-card-content time {
    display: inline-block;
    vertical-align: middle;
    background: var(--feed-date);
    color: var(--feed-accent);
    border-radius: .32rem;
    padding: .16rem .42rem;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}
.home-feed-card-meta {
    display: block;
    margin-top: .55rem;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--muted);
    white-space: nowrap;
    font-size: .76rem;
}
.home-feed-card h3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    margin: .48rem 0 0;
    font-size: clamp(.94rem, 1.25vw, 1.12rem);
    font-weight: 720;
    line-height: 1.35;
}
.home-feed-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .55rem;
    min-height: 2.65rem;
    margin-top: .35rem;
}
.home-feed-gallery-controls button, .home-feed-dialog-header button, .home-feed-retry {
    display: inline-grid;
    place-items: center;
    min-height: 2.75rem;
    min-width: 2.75rem;
    border-radius: .48rem;
    border: 1px solid var(--line);
    color: var(--text);
    background: var(--page);
    font-weight: 700;
}
.home-feed-gallery-controls button:enabled:hover, .home-feed-dialog-header button:hover, .home-feed-retry:hover {
    color: var(--feed-accent);
    background: var(--feed-date);
}
.home-feed button:disabled { opacity: .42; }
.home-feed-empty {
    display: grid;
    justify-items: center;
    align-content: center;
    min-height: 12rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: .75rem;
    background: var(--surface);
    color: var(--muted);
    text-align: center;
}
.home-feed-retry { margin-top: .65rem; padding-inline: .85rem; }
.home-feed-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(42rem, calc(100vw - 1.5rem));
    max-height: calc(100dvh - 1.5rem);
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-radius: .85rem;
    background: var(--page);
    color: var(--text);
}
.home-feed-dialog::backdrop { background: #100b20be; }
.home-feed-dialog-header, .home-feed-dialog-content { padding: .8rem 1rem; }
.home-feed-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.home-feed-dialog-header h3 { font-weight: 750; font-size: 1.05rem; overflow-wrap: anywhere; }
.home-feed-dialog-header button { flex: none; font-size: 1.25rem; }
.home-feed-gallery { background: #100b19; }
.home-feed-slide { display: grid; place-items: center; }
.home-feed-slide img, .home-feed-slide video { display: block; max-width: 100%; max-height: 58dvh; min-height: 3rem; }
.home-feed-embed { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.home-feed-tiktok-embed { width: min(100%, 24rem, 38dvh); aspect-ratio: 9 / 16; }
.home-feed-tiktok-video { width: 100%; height: min(58dvh, 32rem); object-fit: contain; }
.home-feed-gallery-controls { display: flex; align-items: center; justify-content: center; gap: .75rem; padding-top: .75rem; }
.home-feed-dialog-content p { margin-bottom: .55rem; overflow-wrap: anywhere; }
.home-feed-instagram-dialog { width: min(63rem, calc(100vw - 1.5rem)); }
.home-feed-instagram-dialog .home-feed-dialog-header { border-bottom: 1px solid var(--line); }
.home-feed-ig-meta { display: flex; flex-wrap: wrap; gap: .35rem .8rem; color: var(--muted); font-size: .75rem; margin-bottom: .15rem; }
.home-feed-ig-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(15rem, 1fr); align-items: start; }
.home-feed-ig-stage {
    position: relative;
    height: min(68dvh, 44rem);
    min-height: 15rem;
    touch-action: pan-y pinch-zoom;
    user-select: none;
}
.home-feed-ig-stage .home-feed-slide { height: 100%; }
.home-feed-ig-stage img, .home-feed-ig-stage video {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    -webkit-user-drag: none;
}
.home-feed-ig-post-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid #fff5;
    border-radius: 50%;
    color: #fff;
    background: #21172dd9;
}
.home-feed-ig-post-arrow:enabled:hover { background: #432560; }
.home-feed-ig-post-arrow:disabled { visibility: hidden; }
.home-feed-ig-post-arrow svg, .home-feed-instagram-dialog .home-feed-gallery-controls svg {
    width: 1.14rem;
    height: 1.14rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
[dir=rtl] .home-feed-ig-post-arrow svg, [dir=rtl] .home-feed-instagram-dialog .home-feed-gallery-controls svg { transform: rotate(180deg); }
.home-feed-ig-prev { inset-inline-start: .6rem; }
.home-feed-ig-next { inset-inline-end: .6rem; }
.home-feed-instagram-dialog .home-feed-gallery-controls { padding: .65rem; }
.home-feed-instagram-dialog .home-feed-dialog-content { max-height: min(68dvh, 44rem); overflow: auto; padding: 1.15rem; }
.home-feed-instagram-dialog .home-feed-dialog-content p { margin-bottom: .9rem; }
.home-feed :is(button, a, [tabindex]):focus-visible { outline: 2px solid var(--feed-accent); }
@media (max-width: 1100px) { .home-feed-track { grid-auto-columns: calc((100% - 2rem) / 3); } }
@media (max-width: 760px) { .home-feed-track { grid-auto-columns: calc((100% - 1rem) / 2); } }
@media (max-width: 650px) {
    .home-feed-ig-body { display: block; }
    .home-feed-ig-stage { height: min(63dvh, 113vw); }
    .home-feed-instagram-dialog .home-feed-dialog-content { max-height: none; overflow: visible; }
}
@media (max-width: 460px) {
    .home-feed-header { align-items: flex-start; }
    .home-feed-track { grid-auto-columns: 78%; gap: .65rem; }
    .home-feed-tabs a { min-height: 2.75rem; padding-inline: .6rem; }
    .home-feed-tabs svg { display: none; }
}
