/* Лента KoK: компактная центральная колонка и настройки справа. */
.vk-feed-page { background: #141414; color: #e1e3e6; }
.feed-page { max-width: none; margin: 20px 0 60px; padding: 0 20px; }
.feed-layout { display: grid; grid-template-columns: minmax(0, 550px) minmax(220px, 300px); justify-content: space-between; align-items: start; gap: 16px; }
.feed-stream { grid-column: 1; grid-row: 1; min-width: 0; }
.feed-page-title { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.feed-right-column { grid-column: 2; grid-row: 1; width: 100%; justify-self: end; position: sticky; top: 20px; display: grid; gap: 14px; min-width: 0; }
.feed-navigation-card, .feed-topics-card, .feed-discover-card { padding: 8px; border: 1px solid #363636; border-radius: 13px; background: #222; }
.feed-view-nav, .feed-reactions-nav, .feed-filters { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.feed-nav-link, .feed-filters a { display: block; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: #999; text-decoration: none; font-size: .82rem; font-weight: 400; }
.feed-nav-link:hover, .feed-filters a:hover { color: #e1e3e6; background: #2b2b2b; }
.feed-nav-link.active, .feed-filters a.active { background: var(--accent-surface); color: var(--accent-text); border: 0; }
.feed-search-form { padding: 8px 12px 12px; }
.feed-search-form label { display: block; margin-bottom: 8px; color: #e1e3e6; font-size: .82rem; }
.feed-search-form > div { display: flex; align-items: center; min-width: 0; border: 1px solid #444; border-radius: 8px; background: #2c2c2c; }
.feed-search-form input[type="search"] { width: 100%; min-width: 0; padding: 7px 8px; border: 0; background: transparent; color: #ddd; font: inherit; font-size: .76rem; outline: none; }
.feed-search-form > div:focus-within { outline: 2px solid var(--accent-highlight); }
.feed-search-form button { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: #aaa; cursor: pointer; }
.feed-search-form button:hover { background: #444; color: #fff; }
.feed-search-form svg { width: 17px; height: 17px; }
.feed-reactions-nav { border-top: 1px solid #363636; padding-top: 6px; }
.feed-topics-card summary { padding: 6px 12px; color: #c5c5c5; font-size: .82rem; cursor: pointer; }
.feed-filters { width: auto; padding: 6px 0 0; margin: 0; overflow: visible; }
.feed-discover-card { padding: 16px 18px; }
.feed-discover-card strong { display: block; font-size: .85rem; }
.feed-discover-card p { color: #888; margin: 5px 0 14px; font-size: .78rem; }
.feed-discover-card a { display: block; padding: 6px 10px; border-radius: 8px; background: #333; color: #d5d5d5; text-align: center; text-decoration: none; font-size: .8rem; font-weight: 600; }
.feed-discover-card a:hover { background: #3c3c3c; }
.feed-reset-filters { padding: 0 12px; color: var(--accent-text); text-decoration: none; font-size: .78rem; }
.feed-create-button { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 48px; margin-bottom: 16px; padding: 8px 16px; border: 1px solid #363636; border-radius: 12px; background: #222; color: #d6d6d6; font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; }
.feed-create-button { border-color: rgba(var(--accent-rgb), .35); color: var(--accent-text); }
.feed-create-button:hover { background: var(--accent-surface); }
.feed-create-button > span:first-child { font-size: 1.5rem; line-height: 1; font-weight: 400; }
.feed-create-chevron { font-weight: 400; margin-left: 3px; }
.feed-create-button[aria-expanded="true"] .feed-create-chevron { transform: rotate(180deg); }
/* Истории — вертикальные обложки, а не ряд маленьких кружков. */
.vk-feed-page .story-rail {
    --story-card-width: 94px;
    --story-card-height: 168px;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}
.vk-feed-page .story-rail-heading { display: none; }
.vk-feed-page .story-rail-items {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--story-card-width);
    grid-template-rows: var(--story-card-height);
    justify-content: start;
    align-items: stretch;
    gap: 8px;
    min-height: 0;
    padding: 2px 2px 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}
.vk-feed-page .story-rail-item {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--accent-muted), #24222b 65%);
    isolation: isolate;
    text-decoration: none;
}
.vk-feed-page .story-rail-item::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(transparent 30%, rgba(0,0,0,.85));
}
.vk-feed-page .story-cover {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transition: transform .2s;
}
.vk-feed-page .story-rail-item:hover .story-cover { transform: scale(1.04); }
.vk-feed-page .story-rail-avatar, .vk-feed-page .story-create-plus {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-sizing: border-box;
}
.vk-feed-page .story-rail-avatar { padding: 2px; background: var(--accent-highlight); }
.vk-feed-page .story-rail-avatar img {
    display: block;
    width: 36px;
    height: 36px;
    min-width: 0;
    border: 2px solid #222;
    border-radius: 50%;
    object-fit: cover;
}
.vk-feed-page .story-rail-item.is-viewed .story-rail-avatar { background: #777; }
.vk-feed-page .story-rail-item > .story-card-name {
    position: absolute;
    z-index: 2;
    right: 6px;
    bottom: 10px;
    left: 6px;
    display: block;
    width: auto;
    max-width: none;
    height: 18px;
    line-height: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--accent-text);
    text-align: center;
    font-size: .7rem;
}
.vk-feed-page .story-create-card { background: linear-gradient(150deg, var(--accent-highlight), var(--accent-surface) 55%, #242424); }
.vk-feed-page .story-create-card > .story-card-name { color: #e8e8e8; font-weight: 600; }
.vk-feed-page .story-create-plus { padding: 0; background: #fff; color: var(--accent-highlight); font-size: 1.6rem; line-height: 1; }
.vk-feed-page .story-rail-caption {
    position: absolute;
    z-index: 2;
    top: 15px;
    left: 9px;
    right: 9px;
    max-height: 64px;
    overflow: hidden;
    color: #eee;
    text-align: center;
    font-size: .68rem;
    white-space: normal;
    overflow-wrap: anywhere;
}
.vk-feed-page .story-rail-empty { grid-column: span 2; align-self: center; padding: 14px; border: 0; border-radius: 12px; color: #999; font-size: .78rem; white-space: normal; }
/* Публикации: раскладка карточки описана в post-card.css. */
.comments-section { border-color: #363636; background: #202020; }
.feed-composer { margin-bottom: 16px; padding: 16px; border-color: #363636; border-radius: 12px; background: #222; box-shadow: none; }
.feed-composer textarea, .post-tags-field input { background: #292929; border-color: #444; }
.feed-composer textarea:focus, .post-tags-field input:focus { border-color: var(--accent-highlight); outline-color: var(--accent-highlight); box-shadow: none; }
.feed-tool, .feed-type-label select { background: #333; border-color: #444; color: #ccc; }
.feed-submit { background: var(--accent); color: var(--accent-on); }
.feed-submit:hover { background: var(--accent-hover); }
.feed-live-note { margin: 0 0 12px; padding: 0 4px; font-size: .68rem; color: #777; }
.feed-live-pulse { width: 5px; height: 5px; box-shadow: none; animation: none; background: #6d927a; }
.feed-guest-prompt { background: #222; border-color: #363636; font-size: .85rem; }
.feed-guest-prompt a { color: var(--accent-text); }
.new-posts-indicator { border-color: var(--accent-muted); background: var(--accent-surface); color: var(--accent-text); }
.active-tag-filter { color: #aaa; font-size: .8rem; }
.active-tag-filter a { color: var(--accent-text); }
.vk-feed-page footer { border-color: #292929; background: transparent; color: #666; font-size: .75rem; }
.vk-feed-page .pwa-install { display: none; }
.vk-feed-page button:focus-visible, .vk-feed-page a:focus-visible, .feed-topics-card summary:focus-visible { outline: 2px solid var(--accent-highlight); outline-offset: 2px; }
@media (max-width: 1100px) and (min-width: 769px) {
    .feed-page { padding: 0 12px; }
    .feed-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; }
}
@media (max-width: 768px) {
    .feed-layout { display: flex; flex-direction: column; gap: 14px; }
    .feed-stream { order: 2; width: 100%; }
    .feed-right-column { order: 1; position: static; width: 100%; gap: 8px; }
    .feed-navigation-card { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
    .feed-view-nav, .feed-reactions-nav { flex-direction: row; flex-wrap: wrap; gap: 2px; }
    .feed-reactions-nav { padding: 0; border: 0; }
    .feed-nav-link { padding: 7px 10px; }
    .feed-search-form { flex: 1 1 190px; padding: 0; }
    .feed-search-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .feed-discover-card { display: none; }
    .feed-topics-card { padding: 4px 8px; }
    .feed-filters { flex-direction: row; flex-wrap: wrap; }
    .feed-filters a { padding: 5px 10px; }
}
@media (max-width: 768px) {
    .feed-page { margin: 12px 0 100px; padding: 0 10px; }
    .vk-feed-page .story-rail { --story-card-width: 86px; --story-card-height: 150px; }
    .feed-composer { padding: 14px; }
    .feed-create-button { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .vk-feed-page .story-cover { transition: none; }
}
