/* Domain: story */

.story {
    display: flex;
    margin-bottom: 1rem;
}

.story__main {
    padding: .6rem 0;
    width: 100%;
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.story--comments-open .story__main {
    /* Absolute overlay needs a usable panel height on short cards. */
    min-height: min(28rem, calc(100dvh - 2rem));
}

.story__title h1,
.story__title h2 {
    font-size: 26px;
    line-height: 40px;
    font-weight: 400;
    overflow-wrap: anywhere;
    word-break: break-word;
    margin: 0;
}

.story__title h1 a,
.story__title h2 a {
    display: block;
    text-decoration: none;
    color: var(--color-text);
    white-space: pre-line;
}

.story__right {
    margin-left: .8rem;
    position: relative;
    flex-shrink: 0;
}

.story__score {
    position: sticky;
    top: 10px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50px;
}

.story__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .55rem;
    width: 100%;
    margin: .75rem 0 0;
}

.story__action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    width: 50px;
    min-height: 44px;
    padding: .45rem 0 .35rem;
    border: 0;
    border-radius: .5rem;
    background: var(--color-surface);
    color: var(--color-text);
    -webkit-box-shadow: 0 2px 4px 0 rgba(32, 35, 51, .02), 0 1px 1px 0 rgba(32, 35, 51, .04);
    box-shadow: 0 2px 4px 0 rgba(32, 35, 51, .02), 0 1px 1px 0 rgba(32, 35, 51, .04);
    transition: .2s;
    line-height: 1;
    user-select: none;
}

button.story__action {
    cursor: pointer;
}

button.story__action:disabled {
    opacity: .65;
    cursor: wait;
}

.story__action svg {
    width: 22px;
    height: 22px;
    transition: .15s;
}

.story__action span {
    font-size: .7rem;
    color: inherit;
}

.story__action--like svg {
    color: var(--color-text-muted);
    stroke: currentColor;
}

.story__action--like:hover,
.story__action--like:focus-visible {
    background: var(--color-surface-2);
}

.story__action--like.active {
    color: var(--color-danger);
}

.story__action--like.active svg,
.story__action--like:hover svg,
.story__action--like:focus-visible svg {
    color: var(--color-danger);
}

.story__action--like.active svg path {
    fill: currentColor;
    stroke: currentColor;
}

.story__action--comments svg {
    stroke: var(--color-text-muted);
}

.story__action--comments:hover,
.story__action--comments:focus-visible,
.story__action--comments.active {
    color: var(--color-brand);
    background: var(--color-brand-soft);
}

.story__action--comments:hover svg,
.story__action--comments:focus-visible svg,
.story__action--comments.active svg {
    stroke: var(--color-brand);
}

.story__action--views {
    cursor: default;
    min-height: auto;
    padding: .15rem 0 0;
    margin-top: .15rem;
    background: transparent;
    box-shadow: none;
    -webkit-box-shadow: none;
    color: var(--color-text-muted);
}

.story__action--views svg {
    color: inherit;
    width: 18px;
    height: 18px;
}

.story__action--views span {
    color: inherit;
    font-size: .65rem;
}

.story__action--bookmark svg {
    stroke: var(--color-text-muted);
    fill: none;
}

.story__action--bookmark:hover,
.story__action--bookmark:focus-visible {
    background: var(--color-brand-soft);
}

.story__action--bookmark:hover svg,
.story__action--bookmark:focus-visible svg {
    stroke: var(--color-brand);
}

.story__action--bookmark.active {
    color: var(--color-brand);
    background: var(--color-brand-alpha);
}

.story__action--bookmark.active svg {
    stroke: var(--color-brand);
    fill: var(--color-brand);
}

.story__comments-overlay {
    /* Desktop: cover story card content in-place (does not push layout).
       Mobile sheet overrides via .story__comments-overlay--sheet. */
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: auto;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 1.5rem;
    box-sizing: border-box;
    background: rgba(20, 22, 28, .38);
    border-radius: .5rem;
    overflow: hidden;
}

.story__comments-drawer {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    background: var(--color-surface);
    border-radius: .5rem;
    overflow: hidden;
    -webkit-box-shadow: 0 8px 24px rgba(20, 22, 28, .18);
    box-shadow: 0 8px 24px rgba(20, 22, 28, .18);
}

.story__comments-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
    position: relative;
}

.story__comments-drawer-handle {
    display: none;
}

.story__comments-drawer-title {
    font-size: .95rem;
    font-weight: 600;
    color: var(--color-inverse);
}

.story__comments-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: .35rem;
    background: transparent;
    color: var(--color-text-muted);
    transition: .2s;
}

.story__comments-drawer-close svg {
    width: 22px;
    height: 22px;
}

.story__comments-drawer-close:hover,
.story__comments-drawer-close:focus-visible {
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
}

.story__comments-drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.comments__story--embedded {
    padding: 0;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: 100%;
}

.comments__story--embedded .comments__story-list-wrap {
    max-width: 100%;
}

.comments__story--embedded .comments__story-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Desktop: allow wheel to chain to the page when list is short or at edge.
       Mobile sheet re-enables contain below. */
    overscroll-behavior: auto;
    padding: .65rem .75rem 0;
}

.comments__story--embedded .comments__form {
    position: relative;
    bottom: auto;
    flex-shrink: 0;
    margin-top: 0;
    padding: .55rem .75rem .7rem;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -6px 12px -10px rgba(32, 35, 51, .18);
}

.story__collapse-btn {
    border-radius: .5rem;
    -webkit-box-shadow: 0 2px 4px 0 rgba(32, 35, 51, .02), 0 1px 1px 0 rgba(32, 35, 51, .04);
    box-shadow: 0 2px 4px 0 rgba(32, 35, 51, .02), 0 1px 1px 0 rgba(32, 35, 51, .04);
    background: var(--color-surface);
    border: none;
    width: 100%;
    margin-top: 1rem;
    transition: .2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.story__collapse-btn:hover {
    background: var(--color-border);
}

button.story__collapse-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--color-border-strong);
    stroke: var(--color-border-strong);
}

.story__collapse-btn-plus {
    display: none;
}

.story__header {
    padding: 0 1rem;
}

.story__header-top {
    display: flex;
    justify-content: space-between;
}

.story__header-menu {
    position: relative;
}

.story__header-menu-btn {
    border: 0;
    background: initial;
    border-radius: .3rem;
    transition: .2s;
    outline: none;
}

.story__header-menu-btn::after {
    display: none;
}

.story__header-menu-btn svg {
    width: 22px;
    height: 22px;
    fill: var(--color-text-muted);
    stroke: var(--color-text-muted);
    transition: .2s;
}

.story__header-menu-btn:hover,
.story__header-menu-btn:active,
.story__header-menu-btn:focus {
    background: var(--color-surface-2);
}

.story__header-menu-btn:hover svg,
.story__header-menu-btn:active svg,
.story__header-menu-btn:focus svg {
    stroke: var(--color-text-muted);
}

.story__header-menu-list {
    background: var(--color-surface);
    border-radius: .3rem;
    -webkit-box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.08);
    border: 0;
    padding: .3rem;
}

.story__header-menu-list .dropdown-item {
    padding: .4rem .5rem;
    cursor: pointer;
    border: 0;
    line-height: 1;
    border-radius: .3rem;
    transition: .2s;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
}

.story__header-menu-list .dropdown-item > svg {
    width: 20px;
    height: 20px;
    color: var(--color-brand);
}

.story__header-menu-list .dropdown-item:hover {
    background: var(--color-surface-2);
}

.story__user {
    display: flex;
    align-items: center;
    margin-bottom: .5rem;
}

.story__user-link {
    font-size: .8rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: bold;
    transition: .1s;
    display: flex;
    align-items: center;
    line-height: 1;
    margin-right: .5rem;
}

.story__user-link:hover {
    opacity: .9;
}

.story__user-photo {
    display: flex;
    justify-content: center;
    transition: .3s;
}

.story__user-photo:hover {
    opacity: .9;
}

.story__user-photo span {
    width: 45px;
    min-width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    outline: none;
    transition: .3s;
    display: inline-block;
}

.story__user-photo span img {
    width: 100%;
    height: 100%;
    background-size: cover;
    display: block;
    object-fit: cover;
    border-radius: .1rem;
}

.story__date {
    color: var(--color-text-muted);
    font-size: .8rem;
    line-height: 1;
    margin-right: .5rem;
}

.story__edited {
    color: var(--color-text-muted);
    font-size: .75rem;
    white-space: nowrap;
}

.story__content-slice-height {
    max-height: 450px;
    overflow: hidden;
}

.story__read-more {
    cursor: pointer;
    padding: .8rem 1rem;
    font-weight: bold;
    background: var(--color-surface-2);
    transition: .2s;
    display: flex;
    align-items: center;
    position: relative;
}

.story__read-more:before {
    content: "";
    width: 100%;
    height: 15px;
    position: absolute;
    left: 0;
    bottom: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0), var(--color-surface));
}

.story__read-more:hover {
    background: var(--color-surface-2);
}

.story__read-more span {
    display: inline-flex;
    line-height: 1;
    font-weight: normal;
    margin-left: .5rem;
    font-size: .8rem;
    align-items: center;
}

.story__read-more span svg {
    width: 15px;
    height: 15px;
    fill: var(--color-text);
    stroke: var(--color-text);
    margin-left: .1rem;
}

.story-media__image {
    margin-bottom: .5rem;
}

.story-media__image img,
.story-media__image picture {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.story-media__image-title {
    color: var(--color-text-muted);
    font-size: .8rem;
    padding: .2rem 1rem;
    margin: 0;
}

.story-media__text {
    font-size: 1rem;
    line-height: 1.7rem;
    padding: 0 1rem;
    margin-bottom: .5rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.story-media__text img,
.story-media__text video,
.story-media__text iframe,
.story-media__text table {
    max-width: 100%;
    height: auto;
}

.story-media__quote {
    display: flex;
    margin: 0 1rem .8rem;
    border-radius: .5rem;
    overflow: hidden;
}

.story-media__quote-line {
    min-width: 6px;
    border-radius: 2px;
    background: var(--color-brand);
}

.story-media__quote-wrap {
    display: flex;
    width: 100%;
    flex-direction: column;
    background: linear-gradient(157deg, rgba(255, 255, 255, .25) -11%, rgba(255, 255, 255, 0) 100%), var(--color-brand-alpha);
}

.story-media__quote-text {
    font-size: 1.2rem;
    line-height: 1.8rem;
    width: 100%;
    padding: .5rem 1.5rem .5rem .5rem;
    position: relative;
}

.story-media__quote-text:after {
    content: 'В»';
    position: absolute;
    right: 7px;
    top: 1px;
    font-size: 2.5rem;
    color: var(--color-brand);
}

.story-media__quote-title {
    padding: .3rem .5rem;
    font-size: .8rem;
    color: var(--color-text-secondary);
}

.story-media__link {
    line-height: 1.7rem;
    padding: 0 1rem;
    margin-bottom: .5rem;
}

.story-media__link a {
    color: var(--color-info);
    font-size: 1rem;
    text-decoration: none;
    transition: .2s;
}

.story-media__link a:hover,
.story-media__link a:active,
.story-media__link a:focus {
    color: var(--color-info);
}

.story-media__link a:hover svg,
.story-media__link a:active svg,
.story-media__link a:focus svg {
    fill: var(--color-info);
}

.story-media__link a svg {
    width: 23px;
    height: 23px;
    fill: var(--color-info);
    margin-right: .4rem;
}

.story-media__video-attachment {
    width: 100%;
    margin-bottom: 2rem;
    box-sizing: border-box;
    display: block;
}

.story-media__video-attachment-wrap:not(:empty) {
    height: 350px;
    overflow: hidden;
    position: relative;
}

.story-media__video-attachment iframe {
    height: 350px;
    width: 100%;
}

.story-media__video-attachment-poster {
    width: 100%;
    display: flex;
    justify-content: center;
    height: 350px;
    background: var(--color-border);
    overflow: hidden;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.story-media__video-attachment-poster:hover .story-media__video-attachment-button {
    background: rgb(255 2555 255 / 90%);
}

.story-media__video-attachment-poster img {
    height: 100%;
    width: auto;
}

.story-media__video-attachment-info {
    position: absolute;
    text-align: center;
}

.story-media__video-attachment-caption {
    font-size: .8rem;
    display: flex;
    align-items: center;
    color: var(--color-text);
    background: var(--color-surface);
    border-radius: .3rem;
    padding: .2rem 1rem;
}

.story-media__video-attachment-caption svg {
    width: 20px;
    margin-left: .5rem;
}

svg.story-media__video-attachment-background {
    opacity: .2;
    width: 100%;
}

.story-media__video-attachment-button {
    font-size: 35px;
    color: var(--color-inverse-text);
    background: rgb(255 2555 255 / 52%);
    width: 80px;
    height: 80px;
    text-align: center;
    line-height: 80px;
    border-radius: 50%;
    padding-left: 9px;
    transition: .2s;
    user-select: none;
    display: inline-block;
    margin-bottom: .7rem;
}

.story-media__video-attachment-button svg {
    width: 50px;
    height: auto;
    fill: rgb(134 44 253);
}

.story-media__video-attachment-title {
    color: var(--color-text);
    font-size: .8rem;
    padding: .2rem 1rem;
    margin: 0;
}

.story-media__video {
    width: 100%;
    margin-bottom: 1rem;
    box-sizing: border-box;
    display: block;
}

.story-media__video-wrap:not(:empty) {
    height: 350px;
    overflow: hidden;
    position: relative;
    background: var(--color-inverse);
}

.story-media__video-wrap .plyr {
    height: 100%;
}

.story-media__video-wrap .plyr__video-wrapper {
    height: 100%;
    padding-bottom: 0;
    aspect-ratio: auto;
}

.story-media__video-wrap .plyr__video-wrapper video,
.story-media__video video {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.story-media__video-poster {
    width: 100%;
    display: flex;
    justify-content: center;
    height: 350px;
    background: var(--color-inverse);
    overflow: hidden;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.story-media__video-poster:hover .story-media__video-button {
    background: rgb(134 44 253);
}

.story-media__video-poster img {
    height: 100%;
    width: auto;
}

.story-media__video-button {
    position: absolute;
    font-size: 35px;
    color: var(--color-inverse-text);
    background: rgb(134 44 253 / 52%);
    width: 80px;
    height: 80px;
    text-align: center;
    line-height: 80px;
    border-radius: 50%;
    padding-left: 9px;
    transition: .2s;
    user-select: none;
}

.story-media__video-title {
    color: var(--color-text);
    font-size: .8rem;
    padding: .2rem 1rem;
    margin: 0;
}

.story-media__loop {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .65rem;
    line-height: 1;
    color: var(--color-text-muted);
    user-select: none;
}

.story-media__video > .story-media__loop {
    padding: .15rem 1rem .1rem;
}

.story-media__loop svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

.story-media__special {
    min-height: 320px;
    display: flex;
    text-align: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    margin-bottom: 1rem;
}

.story-media__special-text {
    width: 100%;
    overflow-wrap: break-word;
    overflow: hidden;
    font-size: 1.9rem;
    position: relative;
    margin: auto;
    color: var(--color-inverse-text);
    font-weight: bold;
    line-height: 2.4rem;
    white-space: pre-line;
}

.story-media__special-pattern {
    position: absolute;
    top: 0;
    right: 3rem;
    bottom: 0;
    text-align: right;
    overflow: hidden;
    height: 100%;
}

.story-media__special-pattern svg {
    height: 100%;
    opacity: .2;
}

.media-special__color-1 {
    background: linear-gradient(157deg, rgba(255, 255, 255, .25) -11%, rgba(255, 255, 255, 0) 100%), #0069DE;
}

.media-special__color-2 {
    background: linear-gradient(157deg, rgba(255, 255, 255, .25) -11%, rgba(255, 255, 255, 0) 100%), #D32F2F;
}

.media-special__color-3 {
    background: linear-gradient(157deg, rgba(255, 255, 255, .25) -11%, rgba(255, 255, 255, 0) 100%), #6A1B9A;
}

.media-special__color-4 {
    background: linear-gradient(157deg, rgba(255, 255, 255, .25) -11%, rgba(255, 255, 255, 0) 100%), #388E3C;
}

.media-special__color-5 {
    background: linear-gradient(157deg, rgba(255, 255, 255, .25) -11%, rgba(255, 255, 255, 0) 100%), #EF6C00;
}

.media-special__color-6 {
    background: linear-gradient(157deg, rgba(255, 255, 255, .25) -11%, rgba(255, 255, 255, 0) 100%), #424242;
}

.media-special__color-7 {
    background: linear-gradient(157deg, rgba(255, 255, 255, .25) -11%, rgba(255, 255, 255, 0) 100%), #D81B60;
}

.story-poll {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem 1rem;
    background: var(--color-surface);
}

.story-poll__title {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--color-text);
    overflow-wrap: anywhere;
}

.story-poll__title--placeholder {
    color: var(--color-text-muted);
    font-weight: 500;
}

.story-poll__options {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.story-poll__choice {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
    text-align: left;
    border: 0;
    border-radius: 0.5rem;
    background: var(--color-bg);
    padding: 0.65rem 0.75rem;
    color: var(--color-text);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.story-poll__choice:hover:not(:disabled),
.story-poll__choice:focus-visible {
    background: var(--color-brand-soft);
    outline: none;
}

.story-poll__option--selected .story-poll__choice {
    border-color: var(--color-brand-soft);
    background: var(--color-brand-soft);
}

.story-poll__choice:disabled {
    cursor: default;
    opacity: 0.85;
}

.story-poll__control {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.1rem;
    border: 1.5px solid var(--color-text-muted);
    background: var(--color-surface);
    position: relative;
}

.story-poll__control--radio {
    border-radius: 50%;
}

.story-poll__control--check {
    border-radius: 0.25rem;
}

.story-poll__control[data-checked='1'] {
    border-color: var(--color-brand);
    background: var(--color-brand);
}

.story-poll__control[data-checked='1']::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
}

.story-poll__control--radio[data-checked='1']::after {
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    background: var(--color-inverse-text, #fff);
}

.story-poll__control--check[data-checked='1']::after {
    width: 0.35rem;
    height: 0.55rem;
    border: solid var(--color-inverse-text, #fff);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.story-poll__option-text {
    flex: 1;
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.story-poll__result {
    padding: 0.35rem 0.15rem 0.2rem;
}

.story-poll__result-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.3rem;
}

.story-poll__result-meta {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text);
}

.story-poll__result-votes {
    font-weight: 400;
    color: var(--color-text-muted);
}

.story-poll__bar {
    height: 0.35rem;
    border-radius: 999px;
    background: var(--color-surface-2);
    overflow: hidden;
}

.story-poll__bar-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--color-brand);
    transition: width 0.25s ease;
    min-width: 0;
}

.story-poll__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
    margin-top: 0.85rem;
}

.story-poll__vote {
    border: 0;
    border-radius: 0.45rem;
    background: var(--color-brand);
    color: var(--color-inverse-text, #fff);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.story-poll__vote:hover:not(:disabled),
.story-poll__vote:focus-visible:not(:disabled) {
    opacity: 0.92;
    outline: none;
}

.story-poll__vote:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.story-poll__hint,
.story-poll__voters {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.story-poll__change {
    border: 0;
    background: transparent;
    color: var(--color-brand);
    font-size: 0.82rem;
    padding: 0.2rem 0;
    text-underline-offset: 2px;
}

.story-poll__change:hover:not(:disabled),
.story-poll__change:focus-visible:not(:disabled) {
    opacity: 0.85;
    outline: none;
}

.story-poll__change:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.story-poll--disabled .story-poll__choice {
    cursor: default;
}

.story-media__audio {
    margin-bottom: .5rem;
    width: 100%;
    padding: 0 1rem;
}

.story-media__audio-wrap {
    width: 100%;
    display: flex;
    overflow: hidden;
    flex-direction: row;
    align-items: center;
}

.story-media__audio-button {
    color: var(--color-brand);
    font-size: 1.6rem;
    border-radius: 50%;
    min-width: 45px;
    min-height: 45px;
    line-height: 1rem;
    padding-left: 13px;
    border: 0;
    background: var(--color-border);
    margin-right: .8rem;
    transition: .2s;
    width: 45px;
    outline: none;
}

.story-media__audio-button:hover {
    background: var(--color-border-strong);
}

.story-media__audio-button[data-play="on"] {
    padding-left: 8px;
}

.story-media__audio-info {
    padding: .5rem 0;
    width: 100%;
}

.story-media__audio-title {
    border-radius: .5rem;
    outline: none;
    transition: .2s;
}

.story-media__audio-meta {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
    padding-top: .3rem;
}

.story-media__audio-duration {
    font-size: .7rem;
    color: var(--color-text);
    line-height: 1;
}

.story__footer {
    padding: .65rem 1rem 0;
    margin-top: auto;
}

.story__tags-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
    width: 100%;
}

.story__tags-list {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .5rem;
    flex: 1;
    width: auto;
    min-width: 0;
    overflow: hidden;
}

.story__tags-list--expanded {
    flex-wrap: wrap;
    overflow: visible;
}

.story__tags-list a,
.story__tag {
    text-decoration: none;
    display: inline-block;
    margin: 0;
    font-size: .8rem;
    transition: .2s;
    color: var(--color-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    max-width: min(100%, 16rem);
    overflow: hidden;
    text-overflow: ellipsis;
}

.story__tags-list a:hover,
.story__tags-list a:active,
.story__tags-list a:focus {
    color: var(--color-text);
}

.story__tags-more {
    flex-shrink: 0;
    border: 0;
    border-radius: .35rem;
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
    font-size: .75rem;
    line-height: 1;
    padding: .28rem .45rem;
    cursor: pointer;
    transition: .2s;
}

.story__tags-more:hover,
.story__tags-more:focus-visible {
    background: var(--color-border);
    color: var(--color-text);
}

.story__tags-measure {
    position: absolute;
    left: -9999px;
    top: 0;
    visibility: hidden;
    pointer-events: none;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
}

.story__tags-empty {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: .8rem;
    text-align: left;
    padding: .15rem 0;
    cursor: pointer;
    transition: color .2s;
}

.story__tags-empty:hover,
.story__tags-empty:focus-visible {
    color: var(--color-text-secondary);
}

.story__tags-edit {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin: -.15rem 0 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: .35rem;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color .2s, background .2s;
}

.story__tags-edit svg {
    width: 18px;
    height: 18px;
    display: block;
}

.story__tags-edit:hover,
.story__tags-edit:active,
.story__tags-edit:focus-visible {
    color: var(--color-text-secondary);
    background: var(--color-surface-2);
}

.story__tags-edit--has-proposals {
    color: var(--color-info);
}

.story__tags-edit--has-proposals:hover,
.story__tags-edit--has-proposals:focus-visible {
    color: var(--color-info);
    background: var(--color-info-soft);
}

.story__tags-edit-dot {
    position: absolute;
    top: 0.1rem;
    right: 0.1rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--color-info);
    box-shadow: 0 0 0 1.5px var(--color-surface);
    pointer-events: none;
}

.story__games-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
    width: 100%;
    margin-bottom: .45rem;
}

.story__games-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    flex: 1;
    min-width: 0;
}

.story__game-badge-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    max-width: min(100%, 14rem);
}

.story__game {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    max-width: 100%;
    padding: .15rem .45rem .15rem .15rem;
    border-radius: .4rem;
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: .78rem;
    line-height: 1.2;
    transition: color .2s, background .2s;
}

.story__game:hover,
.story__game:focus-visible {
    color: var(--color-text);
    background: var(--color-border);
}

.story__game-cover {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: .28rem;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--color-surface);
}

.story__game-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.story__game-quick-view {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    width: 1.15rem;
    height: 1.15rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-muted);
    box-shadow: 0 0 0 1px var(--color-border);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
}

.story__game-quick-view svg {
    width: 0.7rem;
    height: 0.7rem;
    display: block;
}

@media (max-width: 767px) {
    .story__game-quick-view {
        display: inline-flex;
    }
}

.story__games-empty {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: .8rem;
    text-align: left;
    padding: .15rem 0;
    cursor: pointer;
    transition: color .2s;
}

.story__games-empty:hover,
.story__games-empty:focus-visible {
    color: var(--color-text-secondary);
}

.story__games-edit {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin: -.15rem 0 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: .35rem;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color .2s, background .2s;
}

.story__games-edit svg {
    width: 18px;
    height: 18px;
    display: block;
}

.story__games-edit:hover,
.story__games-edit:active,
.story__games-edit:focus-visible {
    color: var(--color-text-secondary);
    background: var(--color-surface-2);
}

.story__games-edit--has-proposals {
    color: var(--color-info);
}

.story__games-edit--has-proposals:hover,
.story__games-edit--has-proposals:focus-visible {
    color: var(--color-info);
    background: var(--color-info-soft);
}

.story__games-edit-dot {
    position: absolute;
    top: 0.1rem;
    right: 0.1rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--color-info);
    box-shadow: 0 0 0 1.5px var(--color-surface);
    pointer-events: none;
}

.story__scroll-btn {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    cursor: pointer;
    border-radius: .3rem;
    opacity: 0;
    transition: opacity 200ms ease-out;
    justify-content: center;
    display: flex;
    border: 0;
}

.story__scroll-btn:hover {
    background: linear-gradient(to bottom, rgb(233 233 233 / 38%) 15%, var(--color-border) 100%);
    opacity: 1;
}

.story__scroll-btn svg {
    width: 20px;
    height: 20px;
    position: absolute;
    bottom: 10px;
}

.story__category {
    font-size: .8rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: bold;
    transition: .1s;
    display: flex;
    align-items: center;
    line-height: 1;
    margin-right: .5rem;
}

.story__category:hover,
.story__category:active,
.story__category:focus {
    opacity: .9;
}

.story__category span {
    width: 23px;
    min-width: 23px;
    height: 23px;
    border-radius: 50%;
    overflow: hidden;
    outline: none;
    margin-right: .5rem;
    transition: .3s;
    display: inline-block;
}

.story__category span img {
    width: 100%;
    height: 100%;
    background-size: cover;
    display: block;
    object-fit: cover;
    border-radius: .1rem;
}

.new__page h1 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.spinner__wrap {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.spinner__circle {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-bg);
    border-top: 4px solid var(--color-info);
    border-radius: 50%;
    animation: spin_circle .4s linear infinite;
}

@keyframes spin_circle {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.category__page h1 {
    font-size: 1.3rem;
    margin-bottom: 0;
}

.category__info {
    margin-bottom: 1rem;
    display: flex;
}

.category__info-image {
    width: 100px;
    height: 100px;
    min-width: 100px;
    overflow: hidden;
    outline: none;
    transition: .3s;
    border-radius: .5rem;
    user-select: none;
    display: inline-block;
    border: 4px solid var(--color-border);
}

.category__info-image img {
    width: 100%;
    height: 100%;
    background-size: cover;
    object-fit: cover;
    display: inline-block;
}

.category__info-data {
    padding: 1rem .8rem;
}

.category__info-detail span {
    color: var(--color-text-muted);
    font-size: .8rem;
    margin-right: .5rem;
}

.category__info-description {
    font-size: .8rem;
    margin-bottom: .5rem;
}

.category__info-description p {
    margin: 0;
    padding: 0;
}

.page__content-empty {
    display: flex;
    text-align: center;
    width: 100%;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 0;
    color: var(--color-text-muted);
    font-size: .9rem;
    user-select: none;
    background: var(--color-surface);
    border-radius: .5rem;
    -webkit-box-shadow: 0 2px 4px 0 rgba(32, 35, 51, .02), 0 1px 1px 0 rgba(32, 35, 51, .04);
    box-shadow: 0 2px 4px 0 rgba(32, 35, 51, .02), 0 1px 1px 0 rgba(32, 35, 51, .04);
}

.page__content-empty svg {
    width: 140px;
    fill: var(--color-border);
}

.bookmarks__page h1 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.bookmarks__page h1 svg {
    width: 20px;
    height: 20px;
    margin-top: -4px;
}

.bookmarks__games {
    margin-top: .25rem;
    padding: 1rem 1.15rem 1.25rem;
}

.bookmarks__games-empty {
    padding: .85rem .25rem;
    color: var(--color-text-muted);
    font-size: .95rem;
}

.bookmarks__skeleton--stories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bookmarks__skeleton-story {
    display: flex;
    margin-bottom: 0;
}

.bookmarks__skeleton-story-main {
    flex: 1;
    min-width: 0;
    padding: 1rem 1.1rem 1.15rem;
}

.bookmarks__skeleton-story-meta {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: .85rem;
}

.bookmarks__skeleton-story-title {
    height: 22px;
    width: 72%;
    border-radius: 6px;
    margin-bottom: .85rem;
}

.bookmarks__skeleton-story-body {
    height: 12px;
    width: 100%;
    border-radius: 6px;
    margin-bottom: .45rem;
}

.bookmarks__skeleton-story-body--short {
    width: 58%;
    margin-bottom: 0;
}

.bookmarks__skeleton-story-side {
    margin-left: .8rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50px;
    gap: .55rem;
    padding-top: .35rem;
}

.bookmarks__skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.bookmarks__skeleton-action {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.bookmarks__skeleton-line {
    height: 10px;
    width: 100%;
    border-radius: 6px;
}

.bookmarks__skeleton-line--short {
    width: 55%;
}

.bookmarks__skeleton-story-meta .bookmarks__skeleton-line {
    width: 42%;
}

.bookmarks__skeleton-story-meta .bookmarks__skeleton-line--short {
    width: 28%;
}

.bookmarks__skeleton-game {
    min-width: 0;
}

.bookmarks__skeleton-game-cover {
    width: 100%;
    height: 200px;
    border-radius: 5px;
    margin-bottom: .5rem;
}

.bookmarks__skeleton-game .bookmarks__skeleton-line {
    margin-bottom: .35rem;
}

.liked__page h1 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.liked__option {
    display: flex;
    margin-bottom: .5rem;
}

.liked__option button {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1rem;
    padding: .4rem 1rem;
    display: block;
    border-radius: .5rem;
    margin-bottom: .3rem;
    transition: .1s;
    border: none;
    margin-right: .5rem;
}

.liked__option button.active,
.liked__option button:hover,
.liked__option button:active,
.liked__option button:focus {
    background: var(--color-surface);
}

.liked__option button svg {
    width: 16px;
    margin-top: -4px;
    margin-left: .3rem;
}

.liked__questions {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.liked__question-item {
    padding: 1rem 1.2rem;
}

.liked__question-vote {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    color: var(--color-success);
    margin-bottom: .45rem;
}

.liked__question-vote svg {
    width: 14px;
    height: 14px;
}

.liked__question-vote.is-dislike {
    color: var(--color-danger);
}

.liked__question-vote.is-dislike svg {
    transform: rotate(180deg);
}

.liked__question-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    margin-bottom: .35rem;
}

.liked__question-title:hover {
    text-decoration: underline;
}

.liked__question-excerpt {
    margin: 0 0 .5rem;
    color: var(--color-text-secondary);
    font-size: .95rem;
    line-height: 1.45;
}

.liked__question-date {
    display: block;
    font-size: .8rem;
    color: var(--color-text-muted);
}

.liked__questions-empty {
    padding: 1rem 1.2rem;
    color: var(--color-text-muted);
}

.liked__questions-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: .5rem;
}

.liked__questions-more {
    border: none;
    background: var(--color-surface);
    border-radius: .5rem;
    padding: .55rem 1.2rem;
    font-size: .95rem;
    cursor: pointer;
}

.liked__questions-more:disabled {
    opacity: .6;
    cursor: default;
}

.tags__page h1 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.tags__page-list-wrap {
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
}

.tags__page-list {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.tags__page-item {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--color-text);
    font-size: .875rem;
    line-height: 1.2;
    text-decoration: none;
    padding: .25rem .45rem;
    border-radius: .3rem;
    transition: background .15s ease;
    background: var(--color-surface-2);
}

.tags__page-item:hover,
.tags__page-item:focus,
.tags__page-item:active {
    background: var(--color-surface-3);
}

.tags__page-item-name {
    min-width: 0;
}

.tags__page-item-counts {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}

.tags__finished {
    text-align: center;
    color: var(--color-border-strong);
    font-size: .8rem;
    margin: .5rem 0;
}

.tags__loading {
    display: flex;
    width: 100%;
    gap: .5rem;
}

.tags__loading span {
    height: 20px;
    width: 25%;
    border-radius: .3rem;
}
.tag__info {
    padding: .5rem;
    margin-bottom: .5rem;
}
.tag__info h1 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.tag__feed span {
    color: var(--color-text-muted);
    font-size: .9rem;
    margin-right: 1rem;
}

.tag__feed span a {
    color: var(--color-text);
}

.category__list-main {
    padding: .6rem 1rem;
    margin-bottom: 1.5rem;
}

.category__list-main h3 {
    margin-bottom: .5rem;
    line-height: 1rem;
    font-size: .9rem;
    color: var(--color-text);
}

.category__list-items a {
    display: flex;
    align-items: center;
    margin-bottom: .5rem;
    text-decoration: none;
    width: 100%;
    border-radius: .5rem;
    transition: .2s;
}

.category__list-items a:hover,
.category__list-items a:focus,
.category__list-items a:active {
    background: var(--color-surface-2);
}

.category__list-items a span {
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    outline: none;
    margin: 0 .5rem;
    transition: .3s;
}

.category__list-items a span img {
    width: 100%;
    height: 100%;
    background-size: cover;
    display: block;
    object-fit: cover;
    border-radius: .1rem;
}

.category__list-items a div {
    font-size: .9rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: bold;
    line-height: 1;
    transition: .1s;
}

.category__list-more {
    background: initial;
    border: 0;
    outline: none;
    color: var(--color-text);
    transition: .1s;
    font-size: .9rem;
    padding: 0;
}

.category__list-more:hover,
.category__list-more:active,
.category__list-more:focus {
    color: var(--color-brand);
}

.category__list-more svg {
    width: 17px;
}

.category__list-more:hover svg,
.category__list-more:active svg,
.category__list-more:focus svg {
    fill: var(--color-brand);
}

.rating__page {
    padding: 1.5rem 0 3rem;
}

.rating__page h1 {
    font-size: 1.3rem;
    margin-bottom: .3rem;
}

.rating__description {
    font-size: .9rem;
    margin-bottom: 1rem;
}

.rating-page__wrap {
    padding: 1rem;
    margin-bottom: 1rem;
}

.rating-page__item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    user-select: none;
}

.rating-page__num {
    font-size: .9rem;
    text-align: center;
    padding: 2px 3px;
    flex-shrink: 0;
}

.rating-page__img {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    overflow: hidden;
    outline: none;
    margin: 0;
    flex-shrink: 0;
    display: block;
    transition: .3s;
}

.rating-page__img:hover img,
.rating-page__img:active img,
.rating-page__img:focus img {
    opacity: .9;
}

.rating-page__img img {
    width: 100%;
    height: 100%;
    background-size: cover;
    display: block;
    object-fit: cover;
    border-radius: .1rem;
}

.rating-page__author {
    min-width: 0;
    overflow: hidden;
}

.rating-page__author a {
    font-size: .9rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: bold;
    line-height: 1.25;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: .1s;
}

.rating-page__author a:hover,
.rating-page__author a:active,
.rating-page__author a:focus {
    color: var(--color-brand);
}

.rating-page__details {
    line-height: 1;
    font-size: .8rem;
    color: var(--color-text-secondary);
}

.rating-page__status {
    background: var(--color-surface-2);
    font-size: .7rem;
    font-weight: normal;
    border-radius: .3rem;
    margin: 0 .3rem;
    padding: 1px 4px;
    color: var(--color-text-secondary);
}

.user__info-level {
    font-size: .85rem;
    color: var(--color-text-secondary);
    margin-top: .15rem;
}

.rating-page__header {
    margin-bottom: 1rem;
    padding: 1.25rem 1rem 1rem;
}

.rating-page__periods {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-top: .75rem;
    padding: .2rem;
    border-radius: .5rem;
    background: var(--color-surface-2);
}

.rating-page__period-btn {
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: .8rem;
    line-height: 1.2;
    padding: .4rem .7rem;
    border-radius: .4rem;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.rating-page__period-btn:hover:not(:disabled):not(.rating-page__period-btn--active),
.rating-page__period-btn:focus-visible:not(:disabled):not(.rating-page__period-btn--active) {
    color: var(--color-text);
    outline: none;
}

.rating-page__period-btn--active {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.rating-page__period-btn:disabled {
    opacity: .65;
    cursor: wait;
}

.rating-page__podium {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: .75rem;
    align-items: end;
    padding: 1.25rem 1rem 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.rating-page__podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .75rem .5rem 1rem;
    border-radius: .5rem;
    background: var(--color-surface-2);
    min-height: 160px;
    justify-content: flex-end;
}

.rating-page__podium-item--1 {
    min-height: 210px;
    background: linear-gradient(180deg, #fff6d8 0%, #fffdf5 100%);
    box-shadow: 0 0 0 1px rgba(212, 175, 55, .28);
    order: 0;
}

.rating-page__podium-item--2 {
    min-height: 168px;
    background: linear-gradient(180deg, #f2f3f6 0%, var(--color-surface-2) 100%);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, .28);
}

.rating-page__podium-item--3 {
    min-height: 160px;
    background: linear-gradient(180deg, #f8efe6 0%, #fffaf5 100%);
    box-shadow: 0 0 0 1px rgba(180, 120, 70, .22);
}

.rating-page__podium-medal {
    font-size: 1.4rem;
    line-height: 1;
    margin-bottom: .4rem;
}

.rating-page__podium-item--1 .rating-page__podium-medal {
    font-size: 1.75rem;
}

.rating-page__podium-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    margin-bottom: .5rem;
    outline: none;
}

.rating-page__podium-item--1 .rating-page__podium-avatar {
    width: 76px;
    height: 76px;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .45);
}

.rating-page__podium-item--2 .rating-page__podium-avatar {
    box-shadow: 0 0 0 3px rgba(148, 163, 184, .45);
}

.rating-page__podium-item--3 .rating-page__podium-avatar {
    box-shadow: 0 0 0 3px rgba(180, 120, 70, .35);
}

.rating-page__podium-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rating-page__podium-name {
    font-size: .9rem;
    font-weight: bold;
    color: var(--color-text);
    text-decoration: none;
    line-height: 1.2;
    margin-bottom: .25rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rating-page__podium-name:hover,
.rating-page__podium-name:focus {
    color: var(--color-brand);
}

.rating-page__podium-score {
    font-size: .8rem;
    color: var(--color-text-muted);
    margin-top: .2rem;
}

.rating-page__top-rest {
    padding: .75rem 1rem;
    margin-bottom: 1rem;
}

.rating-page__top-rest-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem 0;
    border-bottom: 1px solid var(--color-surface-2);
}

.rating-page__top-rest-item:last-child {
    border-bottom: 0;
}

.rating-page__level {
    font-size: .8rem;
    color: var(--color-text-muted);
    margin-top: .2rem;
}

.rating-page__level--sm {
    font-size: .75rem;
    margin-top: .15rem;
}

.rating-page__score {
    margin-left: auto;
    font-size: .85rem;
    font-weight: bold;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.rating-page__personal,
.rating-page__cta,
.rating-page__neighbors,
.rating-page__list,
.rating-page__achievements,
.rating-page__today {
    padding: 1rem;
    margin-bottom: 1rem;
}

.rating-page__personal-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-bottom: .75rem;
}

.rating-page__personal-head h2,
.rating-page__neighbors h2,
.rating-page__achievements h2,
.rating-page__goal h3,
.rating-page__aside-card h3 {
    font-size: 1rem;
    margin: 0 0 .5rem;
}

.rating-page__personal-head h2 {
    margin: 0;
}

.rating-page__leader-badge {
    font-size: .75rem;
    background: var(--color-brand-soft);
    color: var(--color-brand);
    border-radius: .3rem;
    padding: .2rem .5rem;
}

.rating-page__personal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: .75rem;
}

.rating-page__personal-place {
    font-size: 1.35rem;
    font-weight: bold;
    line-height: 1.2;
}

.rating-page__personal-score {
    font-size: .95rem;
    color: var(--color-text-secondary);
    margin: .25rem 0;
}

.rating-page__change {
    font-size: .8rem;
    color: var(--color-text-muted);
}

.rating-page__change--up {
    color: var(--color-success);
}

.rating-page__change--down {
    color: var(--color-danger);
}

.rating-page__change--flat {
    color: var(--color-text-muted);
}

.rating-page__progress-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rating-page__progress-label {
    font-size: .8rem;
    color: var(--color-text-muted);
    margin-bottom: .35rem;
}

.rating-page__progress {
    height: 8px;
    background: var(--color-surface-2);
    border-radius: 999px;
    overflow: hidden;
}

.rating-page__progress-bar {
    height: 100%;
    background: var(--color-brand);
    border-radius: 999px;
    min-width: 2%;
    transition: width .25s ease;
}

.rating-page__progress-value {
    font-size: .8rem;
    color: var(--color-text-muted);
    margin-top: .35rem;
}

.rating-page__goal {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--color-surface-2);
}

.rating-page__goal-title {
    font-size: .9rem;
    font-weight: bold;
    margin-bottom: .4rem;
}

.rating-page__cta {
    text-align: center;
}

.rating-page__cta h2 {
    font-size: 1.05rem;
    margin-bottom: .4rem;
}

.rating-page__cta p {
    font-size: .9rem;
    color: var(--color-text-muted);
    margin-bottom: .85rem;
}

.rating-page__cta-btn {
    border: 0;
    background: var(--color-brand);
    color: var(--color-inverse-text);
    border-radius: .4rem;
    padding: .55rem 1.1rem;
    font-size: .9rem;
    cursor: pointer;
    transition: .15s;
}

.rating-page__cta-btn:hover,
.rating-page__cta-btn:focus {
    background: var(--color-brand-hover);
}

.rating-page__row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: .55rem;
    align-items: center;
    padding: .45rem 0;
    border-bottom: 1px solid var(--color-surface-2);
}

.rating-page__neighbors .rating-page__row {
    grid-template-columns: 36px 40px minmax(0, 1fr) auto;
}

.rating-page__list .rating-page__row {
    grid-template-columns: 36px minmax(0, 1.4fr) minmax(0, .9fr) auto 52px;
}

.rating-page__row--you {
    background: rgba(134, 44, 253, .06);
    border-radius: .35rem;
    margin: 0 -.35rem;
    padding-left: .35rem;
    padding-right: .35rem;
}

.rating-page__user-cell {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
}

.rating-page__you-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: normal;
    background: var(--color-brand);
    color: var(--color-inverse-text);
    border-radius: .25rem;
    padding: 1px 5px;
    margin-left: .35rem;
    vertical-align: middle;
}

.rating-page__list-head {
    display: grid;
    grid-template-columns: 36px minmax(0, 1.4fr) minmax(0, .9fr) auto 52px;
    gap: .55rem;
    font-size: .75rem;
    color: var(--color-text-muted);
    padding: 0 0 .5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: .25rem;
}

.rating-page__neighbors-hint {
    font-size: .8rem;
    color: var(--color-text-muted);
    margin-top: .65rem;
}

.rating-page__empty {
    font-size: .85rem;
    color: var(--color-text-muted);
    padding: .5rem 0;
}

.rating-page__achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.rating-page__achievement {
    padding: .75rem;
    border-radius: .45rem;
    background: var(--color-surface-2);
    border: 1px solid var(--color-brand-soft);
}

.rating-page__achievement--locked {
    opacity: .45;
    filter: grayscale(.4);
}

.rating-page__achievement-icon {
    font-size: 1.25rem;
    line-height: 1;
    margin-bottom: .3rem;
}

.rating-page__achievement-title {
    font-size: .85rem;
    font-weight: bold;
    margin-bottom: .15rem;
}

.rating-page__achievement-desc {
    font-size: .75rem;
    color: var(--color-text-muted);
    line-height: 1.35;
}

.rating-page__aside {
    margin-bottom: 1rem;
}

.rating-page__aside-card {
    padding: 1rem;
    margin-bottom: 1rem;
}

.rating-page__rule,
.rating-page__aside-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    font-size: .85rem;
    padding: .4rem 0;
    border-bottom: 1px solid var(--color-surface-2);
}

.rating-page__rule:last-of-type,
.rating-page__aside-row:last-of-type {
    border-bottom: 0;
}

.rating-page__levels-note {
    margin: .75rem 0 0;
    padding-top: .5rem;
    border-top: 1px solid var(--color-surface-2);
    font-size: .8rem;
    line-height: 1.4;
    color: var(--color-text-muted);
}

.rating-page__aside-row a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rating-page__aside-row a:hover,
.rating-page__aside-row a:focus {
    color: var(--color-brand);
}

.rating-page__aside-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: .75rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
    font-size: .8rem;
    line-height: 1.2;
    padding: .45rem .75rem;
    border-radius: .4rem;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.rating-page__aside-link:hover,
.rating-page__aside-link:focus-visible {
    text-decoration: none;
    outline: none;
    background: var(--color-surface-3, var(--color-surface-2));
    color: var(--color-text);
    border-color: var(--color-border);
}

.rating-page__hide-mobile {
    display: block;
}

.rating-page__streak-badge {
    font-size: .75rem;
    background: var(--color-warning-soft);
    color: var(--color-warning);
    border-radius: .3rem;
    padding: .2rem .5rem;
}

.rating-page__personal-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: end;
    margin-bottom: .75rem;
}

.rating-page__personal-rank {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-inverse);
}

.rating-page__personal-rank span {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-top: .2rem;
}

.rating-page__personal-points strong {
    display: block;
    font-size: 1.75rem;
    line-height: 1.1;
    color: var(--color-brand);
}

.rating-page__personal-points span {
    font-size: .85rem;
    color: var(--color-text-muted);
}

.rating-page__period-points-label {
    display: block;
    font-style: normal;
    font-size: .75rem;
    color: var(--color-text-muted);
    margin-top: .15rem;
}

.rating-page__today-empty p {
    margin: 0 0 .65rem;
    font-size: .85rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.rating-page__change--lg {
    font-size: .9rem;
    margin-bottom: .5rem;
}

.rating-page__level--personal {
    margin-bottom: .85rem;
}

.rating-page__rival {
    padding: .75rem 0 .25rem;
    border-top: 1px solid var(--color-surface-2);
    margin-top: .5rem;
}

.rating-page__rival-user {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: var(--color-text);
    margin-bottom: .55rem;
}

.rating-page__rival-user img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.rating-page__rival-user span {
    display: flex;
    flex-direction: column;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.25;
}

.rating-page__rival-user small {
    font-size: .75rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.rating-page__rival-user:hover,
.rating-page__rival-user:focus {
    color: var(--color-brand);
}

.rating-page__rival-label {
    font-size: .85rem;
    color: var(--color-text-secondary);
    margin-bottom: .4rem;
}

.rating-page__level-progress {
    margin-top: .85rem;
    padding-top: .75rem;
    border-top: 1px solid var(--color-surface-2);
}

.rating-page__progress-bar--level {
    background: linear-gradient(90deg, var(--color-brand), var(--color-brand));
}

.rating-page__today h2,
.rating-page__list-title h2 {
    font-size: 1rem;
    margin: 0 0 .65rem;
}

.rating-page__today-score {
    font-size: .9rem;
    color: var(--color-text-muted);
    margin-bottom: .5rem;
}

.rating-page__today-score strong {
    font-size: 1.35rem;
    color: var(--color-inverse);
    margin-right: .2rem;
}

.rating-page__today-actions {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.rating-page__today-action {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    font-size: .85rem;
    padding: .3rem 0;
    border-bottom: 1px solid var(--color-surface-2);
}

.rating-page__today-action:last-child {
    border-bottom: 0;
}

.rating-page__empty--soft {
    margin: 0;
}

.rating-page__list-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .5rem;
}

.rating-page__list-title span {
    font-size: .8rem;
    color: var(--color-text-muted);
}

.rating-page__list-more {
    text-align: center;
    margin-top: .85rem;
}

.rating-page__list-more-btn {
    border: 0;
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    border-radius: .4rem;
    padding: .4rem .85rem;
    font-size: .82rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.rating-page__list-more-btn:hover:not(:disabled),
.rating-page__list-more-btn:focus-visible:not(:disabled) {
    background: var(--color-surface-3, var(--color-border));
    color: var(--color-text);
    outline: none;
}

.rating-page__list-more-btn:disabled {
    opacity: .65;
    cursor: wait;
}

.rating-page__achievements-section {
    margin-top: .75rem;
}

.rating-page__achievements-section:first-of-type {
    margin-top: .25rem;
}

.rating-page__achievements-section h3 {
    font-size: .85rem;
    color: var(--color-text-muted);
    margin: 0 0 .55rem;
}

.rating-page__achievement--unlocked {
    background: var(--color-brand-soft);
    border-color: var(--color-brand-soft-border);
}

.rating-page__achievement-progress-label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin-top: .35rem;
}

.rating-page__achievement-left {
    font-size: .75rem;
    color: var(--color-text-muted);
    margin-top: .3rem;
    line-height: 1.35;
}

.rating-page__progress--sm {
    height: 6px;
    margin-top: .4rem;
}

.rating-page__score-cta {
    font-size: .8rem;
    color: var(--color-text-muted);
    margin: 0 0 .65rem;
    line-height: 1.4;
}

.rating-page__empty-state {
    padding: .35rem 0 .15rem;
}

.rating-page__empty-state-title {
    font-size: .85rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin-bottom: .25rem;
}

.rating-page__empty-state p {
    margin: 0;
    font-size: .8rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.rating-explain__dialog {
    max-width: 640px;
}

.rating-explain__content {
    position: relative;
    padding: 1.5rem 1.5rem 1.25rem;
    border-radius: .65rem;
    border: 1px solid var(--color-border);
}

.rating-explain__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
}

.rating-explain__hero {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    margin: 0 2rem .85rem 0;
}

.rating-explain__hero-icon {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .55rem;
    background: var(--color-surface-2);
    font-size: 1.35rem;
    line-height: 1;
}

.rating-explain__hero-text h3 {
    font-size: 1.15rem;
    margin: 0 0 .35rem;
    line-height: 1.3;
}

.rating-explain__hero-text p {
    font-size: .9rem;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.45;
}

.rating-explain__motto {
    margin: 0 0 1rem;
    padding: .7rem .85rem;
    border-radius: .5rem;
    background: var(--color-surface-2);
    font-size: .85rem;
    line-height: 1.45;
    color: var(--color-text-secondary);
}

.rating-explain__tips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    margin-bottom: 1.1rem;
}

.rating-explain__tip {
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    padding: .7rem .75rem;
    border-radius: .5rem;
    border: 1px solid var(--color-surface-2);
    background: var(--color-surface);
}

.rating-explain__tip-num {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 700;
    color: var(--color-text-muted);
    background: var(--color-surface-2);
}

.rating-explain__tip p {
    margin: 0;
    font-size: .8rem;
    line-height: 1.4;
    color: var(--color-text-secondary);
}

.rating-explain__rules-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .35rem .75rem;
    margin-bottom: .55rem;
}

.rating-explain__rules-head h4 {
    margin: 0;
    font-size: .9rem;
}

.rating-explain__rules-head span {
    font-size: .75rem;
    color: var(--color-text-muted);
}

.rating-explain__rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .35rem .55rem;
    margin-bottom: 1rem;
}

.rating-explain__rule {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
    padding: .4rem .55rem;
    border-radius: .4rem;
    background: var(--color-surface-2);
    font-size: .8rem;
}

.rating-explain__rule-icon {
    flex-shrink: 0;
    line-height: 1;
}

.rating-explain__rule-title {
    flex: 1;
    min-width: 0;
    color: var(--color-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rating-explain__rule strong {
    flex-shrink: 0;
    color: var(--color-text);
    font-size: .8rem;
}

.rating-explain__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    padding-top: .85rem;
    border-top: 1px solid var(--color-surface-2);
}

.rating-explain__footer-note {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: .8rem;
    line-height: 1.4;
    color: var(--color-text-muted);
}

.rating-explain__dismiss {
    flex-shrink: 0;
    border: 0;
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
    border-radius: .4rem;
    padding: .45rem 1rem;
    font-size: .85rem;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.rating-explain__dismiss:hover,
.rating-explain__dismiss:focus-visible {
    background: var(--color-surface-3, var(--color-border));
    color: var(--color-text);
    outline: none;
}

.story__page-category {
    padding: .5rem .8rem;
    display: flex;
    align-items: center;
    margin-bottom: .5rem;
}

.story__page-category-img {
    width: 50px;
    height: 50px;
    min-width: 50px;
    overflow: hidden;
    outline: none;
    transition: .3s;
    border-radius: .5rem;
    user-select: none;
    display: inline-block;
    border: 2px solid var(--color-border);
    margin-right: 1rem;
    text-decoration: none;
}

.story__page-category-img:hover,
.story__page-category-img:active,
.story__page-category-img:focus {
    opacity: .8;
}

.story__page-category-img img {
    width: 100%;
    height: 100%;
    background-size: cover;
    object-fit: cover;
    display: inline-block;
}

.story__page-category-info {
    line-height: 1rem;
}

.story__page-category-info a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: bold;
    margin-bottom: .3rem;
    display: inline-block;
    transition: .2s;
}

.story__page-category-info a:hover,
.story__page-category-info a:active,
.story__page-category-info a:focus {
    color: var(--color-brand);
}

.story__page-category-info span {
    font-size: .8rem;
    color: var(--color-text-secondary);
    display: block;
}

.story__page-category-info span p {
    margin: 0;
    padding: 0;
}
