.welcome {
    position: relative;
    width: fit-content;
    max-width: 100%;
    font-family: var(--serif-font);
    font-weight: 400;
}

.welcome-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px solid var(--text-color);
    border-radius: 50%;
    background: transparent;
    color: var(--text-color);
    font-size: 15px;
    cursor: pointer;
    opacity: 0.7;
}

.welcome-close:hover {
    opacity: 1;
    background: var(--highlight-bg);
}

.welcome h2 {
    margin: 0 0 22px;
    padding-right: 28px;
    font-size: 240%;
    font-weight: 500;
    line-height: 1.1;
}

.welcome p {
    max-width: 40em;
    margin: 0 0 1.2em;
    font-size: 118%;
    line-height: 1.55;
}

.welcome p:last-child {
    margin-bottom: 0;
}

.welcome a {
    text-decoration: underline;
    font-weight: bold;
}

.welcome-sign {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.4em;
    font-style: italic;
    font-weight: 400;
}

.welcome-sign img {
    display: block;
}

.subheader-search {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: var(--search-gap);
}

    .subheader-search-place {
        display: flex;
        flex: 0 1 auto;
        flex-wrap: wrap;
        gap: var(--search-gap);
        min-width: min(100%, var(--sidebar-width));
        max-width: 100%;
    }

    .subheader-search-geo[data-geo="country"] {
        flex: 0 0 var(--sidebar-width);
        width: var(--sidebar-width);
    }

    .subheader-search-geo[data-geo="city"] {
        flex: 0 1 auto;
        width: auto;
        min-width: 0;
        max-width: 250px;
    }

    .subheader-search .subheader-search-geo {
        padding-top: calc(14px - 0.07em / 1.1);
        padding-bottom: calc(14px - 0.07em / 1.1);
        font-size: calc(var(--input-font-size) * 1.1);
        font-weight: 600;
    }

    .subheader-search-find {
        display: flex;
        flex: 2 1 24rem;
        align-items: stretch;
        gap: var(--search-gap);
        min-width: min(100%, 24rem);
    }

    .subheader-search .subheader-search-query {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        padding-top: calc(14px - 0.07em / 1.1);
        padding-bottom: calc(14px - 0.07em / 1.1);
        font-size: calc(var(--input-font-size) * 1.1);
        font-weight: 500;
    }

    .subheader-search .button {
        flex: 0 0 auto;
        gap: 8px;
        padding: calc(14px - 0.05em / 1.1) 22px;
        font-size: calc(var(--input-font-size) * 1.1);
    }

.sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin-bottom: 0;
    overflow: hidden;
    box-sizing: border-box;
}

    .sidebar-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 14px;
        width: 100%;
        padding: 12px var(--sidebar-item-padding-x);
        box-sizing: border-box;
        border-radius: 0;
        color: var(--text-color);
    }

    .sidebar-item:hover {
        background-color: var(--highlight-bg);
        color: var(--brighter-text-color);
    }

    .sidebar-item-active,
    .sidebar-item-active:hover {
        background-color: var(--highlight-bg-active);
        color: var(--brighter-text-color);
    }

    .sidebar-item-icon {
        flex-shrink: 0;
        width: 1.4em;
        font-size: var(--sidebar-icon-size);
        line-height: 1;
        text-align: center;
    }

    .sidebar-item-icon i {
        font-size: inherit;
    }

    .sidebar-item-name {
        flex: 1;
        min-width: 0;
        font-size: 110%;
        font-weight: 600;
        line-height: 1.25;
    }

    .sidebar-item-count {
        flex-shrink: 0;
        opacity: 0.45;
        font-size: 90%;
        font-weight: 500;
    }

    .sidebar-soon {
        margin-top: 8px;
        padding: 14px var(--sidebar-item-padding-x) 2px;
        border-top: 1px solid var(--separator-color);
        color: #9a9a9a;
        font-size: 11px;
        font-weight: 500;
        line-height: 1;
    }

    .sidebar-item-soon,
    .sidebar-item-soon:hover {
        color: #b0b0b0;
        background: none;
        pointer-events: none;
        cursor: default;
    }

    .sidebar-item-soon .sidebar-item-icon {
        filter: grayscale(1);
        opacity: 0.55;
    }

.index-section + .index-section {
    margin-top: 66px;
}

.index-section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px 20px;
    margin: 20px 0 18px;
}

.index-section-header .index-section-title {
    margin: 0;
}

.index-section-title {
    margin: 20px 0 18px;
    font-size: 172.5%;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
}

.index-cards {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 16px;
}

.index-card {
    position: relative;
    align-items: stretch;
    gap: 12px;
    flex: 1 1 18rem;
    width: auto;
    min-width: 0;
    margin-bottom: 0;
    padding: 16px;
    color: inherit;
    text-decoration: none;
}

@media (min-width: 740px) {
    .index-card {
        /* Flex wrapping uses the basis before shrinking; leave room for two cards and their gap. */
        flex-basis: min(18rem, calc(50% - 8px));
    }
}

.index-card.is-new {
    background-color: var(--promo-bg);
}

.index-card.is-new .index-card-category {
    padding-right: 55px;
}

.index-card-new {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 3px 7px;
    border-radius: 6px;
    background-color: var(--badge-color);
    font-size: 75%;
    font-weight: 700;
    line-height: 1.2;
}

.index-card-cover {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.index-card-category {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 85%;
    font-weight: 700;
    line-height: 1.3;
    opacity: 0.65;
}

.index-card-title-row {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
}

.index-card-title {
    flex: 1;
    min-width: 0;
    font-weight: 700;
    overflow-wrap: anywhere;
    max-height: 6.8em;
    overflow: hidden;
}

.index-card-title-normal {
    font-size: 125%;
    line-height: 1.35;
}

.index-card-title-medium {
    font-size: 110%;
    line-height: 1.3;
}

.index-card-title-small {
    font-size: 100%;
    line-height: 1.3;
}

.index-card-thumb {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--highlight-bg);
}

.index-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.index-card .index-card-rating {
    position: relative;
    z-index: 2;
    margin-left: 0;
    height: 26px;
    padding: 0 7px;
    border-width: 1.6px;
    font-size: 106%;
    cursor: default;
    pointer-events: none;
}

.index-card-rating:hover {
    background: var(--block-bg-color);
}

.index-card-more {
    display: flex;
    width: fit-content;
    margin: 16px auto 0;
}

    .index-card-more i {
        position: relative;
        top: 2px;
    }

.content-subcategories {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.content-feed-bar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px 20px;
    margin-bottom: var(--index-gap);
}

.content-feed-settings {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 10px 20px;
    margin-bottom: 0;
    font-size: 90%;
}

.feed-subscribe {
    margin: 0 0 0 auto;
}

.feed-subscribe.button-toggle {
    margin: 0;
}

.feed-subscribe-button.button-toggle {
    background-color: var(--block-bg-color);
    color: var(--telegram-color);
    border-color: var(--telegram-color);
}

.feed-subscribe-button.button-toggle:hover,
.feed-subscribe-button.button-toggle-active {
    background-color: var(--telegram-color);
    color: var(--button-color);
    border-color: var(--telegram-color);
}

.feed-subscribe-button.button-toggle-active:hover {
    background-color: var(--block-bg-color);
    color: var(--telegram-color);
    border-color: var(--telegram-color);
}

.feed-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.feed-empty .feed-subscribe {
    margin: 0;
    width: auto;
}

.feed-empty .feed-subscribe-button {
    width: auto;
    padding: 15px 18px;
    font-size: 100%;
    justify-content: center;
    white-space: nowrap;
    text-align: center;
}

.content-feed-settings > .button-toggle {
    font-size: 100%;
}

    .content-feed-setting {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin: 0;
        font-size: inherit;
        font-weight: 500;
        cursor: pointer;
        white-space: nowrap;
    }

    .content-feed-settings select {
        width: auto;
        min-width: 10em;
        font-size: inherit;
        font-weight: 500;
        line-height: 1.3;
        padding: 4px 28px 4px 10px;
        background-size: 8px;
        background-position: right 10px center;
    }

    .content-subcategory {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: 104px;
        color: var(--text-color);
        text-align: center;
    }

    .content-subcategory-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 84px;
        height: 84px;
        border-radius: var(--block-border-radius);
        background-color: rgba(0, 0, 0, 0.04);
        font-size: 32px;
        color: var(--text-color);
        transition: transform 0.2s ease-out, background-color 0.2s ease-out, box-shadow 0.2s ease-out;
    }

    .content-subcategory:hover .content-subcategory-icon {
        transform: translateY(-2px);
        background-color: var(--highlight-bg);
        box-shadow: var(--block-shadow);
    }

    .content-subcategory-active .content-subcategory-icon,
    .content-subcategory-active:hover .content-subcategory-icon {
        background-color: var(--highlight-bg-active);
        box-shadow: none;
        transform: none;
    }

    .content-subcategory-name {
        font-size: 95%;
        font-weight: 500;
        line-height: 1.2;
    }

    .content-subcategory-count {
        display: block;
        margin-top: 2px;
        opacity: 0.45;
        font-size: 90%;
        font-weight: 500;
    }

.feed-empty {
    text-align: center;
    padding: 56px 40px;
}

.feed-empty p {
    max-width: 56em;
    margin: 0 auto 8px;
    font-size: 120%;
    font-weight: 650;
    line-height: 1.4;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.feed-empty p + p {
    margin-bottom: 22px;
    font-size: 105%;
    font-weight: 500;
    letter-spacing: 0;
    opacity: 0.62;
}

.feed-empty .feed-empty-subscribers {
    margin: 40px auto 0;
    max-width: 40em;
    font-size: 120%;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0;
    color: #8a8a8a;
    opacity: 1;
}

.feed-empty .feed-empty-subscribers a {
    color: inherit;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}
