/* Форум: разделы чипами, последний ответ в ленте, карточка темы аниме/рецензии */

.forum-cat-chips {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.forum-cat-chips::-webkit-scrollbar {
    display: none;
}

.forum-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--forum-border, rgba(148, 163, 184, 0.18));
    border-radius: 999px;
    color: var(--forum-muted, #9fb3ca);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.forum-cat-chip span {
    font-weight: 500;
    opacity: 0.7;
}

.forum-cat-chip:hover {
    color: var(--forum-text, #e5eefb);
    border-color: var(--forum-border-strong, rgba(148, 163, 184, 0.28));
}

.forum-cat-chip.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--forum-accent, #60a5fa), var(--forum-accent-strong, #2563eb));
}

.forum-cat-chip.is-active span {
    opacity: 0.85;
}

.forum-topic-card__linked-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--forum-accent, #60a5fa);
    font-weight: 600;
}

.forum-topic-card__last {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.08);
    color: var(--forum-muted, #9fb3ca);
    font-size: 0.88rem;
    line-height: 1.45;
    text-decoration: none;
    min-width: 0;
}

.forum-topic-card__last:hover {
    background: rgba(148, 163, 184, 0.14);
    color: var(--forum-text, #e5eefb);
}

.forum-topic-card__last img {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 1px;
}

.forum-topic-card__last span {
    min-width: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.forum-topic-card__last b {
    color: var(--forum-text, #e5eefb);
    font-weight: 600;
}

.forum-linked-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.forum-linked-card__poster {
    flex: 0 0 96px;
}

.forum-linked-card__poster img {
    display: block;
    width: 96px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
}

.forum-linked-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.forum-linked-card__eyebrow {
    color: var(--forum-accent, #60a5fa);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.forum-linked-card__body p {
    margin: 0;
    color: #ecf3ff;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .forum-linked-card__poster {
        flex-basis: 72px;
    }

    .forum-linked-card__poster img {
        width: 72px;
    }
}

/* ---------- Главная форума: лента «тема + последние сообщения» (по мотивам Шикимори) ---------- */

.fh {
    --fh-surface: var(--forum-surface, rgba(15, 23, 42, 0.82));
    --fh-line: rgba(148, 163, 184, 0.14);
    --fh-text: var(--forum-text, #e5eefb);
    --fh-muted: var(--forum-muted, #9fb3ca);
    --fh-link: #93c5fd;
    --fh-accent: var(--forum-accent, #60a5fa);
    --fh-accent-strong: var(--forum-accent-strong, #2563eb);
    gap: 14px;
}

.fh-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.fh-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.fh-head__title {
    min-width: 0;
}

.fh-head h1 {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.2;
    color: #f8fbff;
}

.fh-head p {
    margin: 4px 0 0;
    color: var(--fh-muted);
    font-size: 0.9rem;
}

.fh-menu-btn {
    display: none;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--forum-border, rgba(148, 163, 184, 0.18));
    border-radius: 10px;
    background: var(--fh-surface);
    color: var(--fh-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    flex: 0 0 auto;
}

.fh-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    border-bottom: 1px solid var(--fh-line);
}

.fh-sort {
    display: flex;
    gap: 4px;
    margin-bottom: -1px;
}

.fh-sort a {
    padding: 10px 12px;
    border-bottom: 2px solid transparent;
    color: var(--fh-muted);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
}

.fh-sort a:hover {
    color: var(--fh-text);
}

.fh-sort a.is-active {
    color: var(--fh-text);
    border-bottom-color: var(--fh-accent);
}

.fh-search {
    display: flex;
    align-items: center;
    width: min(100%, 280px);
    margin-bottom: 6px;
    border: 1px solid var(--forum-border, rgba(148, 163, 184, 0.18));
    border-radius: 10px;
    background: var(--fh-surface);
}

.fh-search input {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--fh-text);
    font: inherit;
    font-size: 0.92rem;
    outline: none;
}

.fh-search button {
    width: 40px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--fh-muted);
    cursor: pointer;
}

.fh-search:focus-within {
    border-color: var(--fh-accent);
}

.fh-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}

.fh-feed {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.fh-topic {
    padding: 14px 0 10px;
    border-bottom: 1px solid var(--fh-line);
}

.fh-topic__head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.fh-topic__thumb img {
    display: block;
    width: 36px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
}

.fh-topic__titlebox {
    min-width: 0;
}

.fh-topic__title {
    color: var(--fh-text);
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.35;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.fh-topic__title:hover {
    color: var(--fh-link);
}

.fh-topic__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    margin-top: 3px;
    color: var(--fh-muted);
    font-size: 0.82rem;
}

.fh-topic__meta a {
    color: var(--fh-muted);
    text-decoration: none;
}

.fh-topic__meta a:hover {
    color: var(--fh-text);
}

.fh-tag {
    color: #fbbf24;
    font-weight: 600;
}

.fh-tag--ok {
    color: #4ade80;
}

.fh-topic__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    margin: 6px 0 0 48px;
    padding: 0 10px;
    border: 1px dashed var(--fh-line);
    border-radius: 8px;
    background: transparent;
    color: var(--fh-muted);
    font: inherit;
    font-size: 0.84rem;
    cursor: pointer;
}

.fh-topic__more:hover {
    color: var(--fh-link);
    border-color: rgba(147, 197, 253, 0.4);
}

.fh-topic__more:disabled {
    opacity: 0.6;
    cursor: progress;
}

.fh-msgs .fh-msg:first-child {
    border-top: 0;
    padding-top: 0;
}

.fh-msg.is-new {
    background: rgba(96, 165, 250, 0.1);
    border-radius: 8px;
}

.fh-msg__acts {
    display: flex;
    gap: 14px;
    margin-top: 4px;
}

.fh-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--fh-muted);
    font: inherit;
    font-size: 0.82rem;
    text-decoration: none;
    cursor: pointer;
}

.fh-link-btn:hover,
.fh-link-btn:focus-visible {
    color: var(--fh-link);
}

.fh-reply {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0 0 48px;
    padding: 10px;
    border: 1px solid var(--fh-line);
    border-radius: 12px;
    background: var(--fh-surface);
}

.fh-reply:focus-within {
    border-color: var(--fh-accent);
}

.fh-reply__to {
    color: var(--fh-muted);
    font-size: 0.82rem;
}

.fh-reply__to b {
    color: var(--fh-link);
}

.fh-reply textarea {
    width: 100%;
    min-height: 72px;
    padding: 6px 4px;
    border: 0;
    background: transparent;
    color: var(--fh-text);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.fh-reply__bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.fh-reply__hint {
    margin-right: auto;
    color: var(--fh-muted);
    font-size: 0.78rem;
}

.fh-reply .fh-btn {
    min-height: 36px;
    padding: 0 14px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.fh-msg {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    padding-left: 48px;
}

.fh-topic__head + .fh-msg,
.fh-topic__more + .fh-msg {
    margin-top: 8px;
}

.fh-msg + .fh-msg {
    padding-top: 10px;
    border-top: 1px dashed var(--fh-line);
}

.fh-msg__av img {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.fh-msg__main {
    flex: 1;
    min-width: 0;
}

.fh-msg__hd {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    font-size: 0.85rem;
}

.fh-msg__nick {
    color: var(--fh-link);
    font-weight: 600;
    text-decoration: none;
}

.fh-msg__time {
    color: var(--fh-muted);
    font-size: 0.8rem;
    text-decoration: none;
}

.fh-msg__body {
    margin-top: 2px;
    max-height: 9.6em;
    overflow: hidden;
    color: var(--fh-text);
    font-size: 0.95rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    -webkit-mask-image: linear-gradient(#000 75%, transparent);
    mask-image: linear-gradient(#000 75%, transparent);
}

.fh-msg__body:has(.forum-rich-image) {
    max-height: 15em;
}

.fh-msg__body a {
    color: var(--fh-link);
}

.fh-msg__body .forum-rich-image-link {
    display: inline-block;
    margin: 4px 6px 0 0;
}

.fh-msg__body .forum-rich-image {
    display: block;
    max-width: min(100%, 240px);
    max-height: 160px;
    border-radius: 8px;
}

.fh-msg__body .forum-rich-quote {
    margin: 4px 0;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.1);
    color: var(--fh-muted);
}

.fh-msg__body .forum-rich-spoiler > summary {
    cursor: pointer;
    color: var(--fh-muted);
}

.fh-topic__foot {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    padding-left: 48px;
}

.fh-empty {
    padding: 24px 0;
    color: var(--fh-muted);
}

.fh-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 18px 0;
    color: var(--fh-muted);
}

.fh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--forum-border, rgba(148, 163, 184, 0.18));
    border-radius: 10px;
    background: var(--fh-surface);
    color: var(--fh-text);
    font-weight: 600;
    text-decoration: none;
}

.fh-btn--primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--fh-accent), var(--fh-accent-strong));
    color: #fff;
}

.fh-btn--wide {
    flex: 1;
}

.fh-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.fh-side__top {
    display: flex;
    gap: 8px;
}

.fh-side__close,
.fh-backdrop {
    display: none;
}

.fh-cats {
    display: flex;
    flex-direction: column;
}

.fh-cats a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 8px;
    color: var(--fh-link);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}

.fh-cats a small {
    color: var(--fh-muted);
    font-weight: 400;
    font-size: 0.8rem;
}

.fh-cats a:hover {
    background: rgba(148, 163, 184, 0.08);
}

.fh-cats a.is-active {
    background: rgba(96, 165, 250, 0.14);
    color: var(--fh-text);
}

.fh-block h2 {
    margin: 0 0 6px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.1);
    color: var(--fh-text);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fh-block h2 a {
    display: flex;
    justify-content: space-between;
    color: inherit;
    text-decoration: none;
}

.fh-mini {
    display: flex;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px dashed var(--fh-line);
    text-decoration: none;
}

.fh-mini:last-child {
    border-bottom: 0;
}

.fh-mini img {
    width: 34px;
    height: 48px;
    flex: 0 0 34px;
    border-radius: 5px;
    object-fit: cover;
}

.fh-mini span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.fh-mini strong {
    color: var(--fh-link);
    font-size: 0.9rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.fh-mini small {
    color: var(--fh-muted);
    font-size: 0.78rem;
}

.fh-mini:hover strong {
    color: var(--fh-text);
}

/* Телефон и планшет: разделы выезжают справа, как на Шикимори */
@media (max-width: 1080px) {
    .fh-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .fh-menu-btn {
        display: inline-flex;
    }

    .fh-side {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1500;
        width: min(320px, 86vw);
        padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        background: #0f172a;
        border-left: 1px solid var(--fh-line);
        transform: translateX(105%);
        transition: transform 0.2s ease;
        visibility: hidden;
    }

    body.fh-side-open .fh-side {
        transform: none;
        visibility: visible;
    }

    .fh-side__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        border: 1px solid var(--forum-border, rgba(148, 163, 184, 0.18));
        border-radius: 10px;
        background: transparent;
        color: var(--fh-text);
        cursor: pointer;
    }

    .fh-backdrop:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1499;
        border: 0;
        padding: 0;
        background: rgba(2, 6, 23, 0.6);
    }

    body.fh-side-open {
        overflow: hidden;
    }
}

@media (max-width: 640px) {
    .fh-head h1 {
        font-size: 1.35rem;
    }

    .fh-tools {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 8px;
    }

    .fh-search {
        width: 100%;
        margin: 0;
    }

    .fh-sort {
        overflow-x: auto;
    }

    .fh-msg,
    .fh-topic__foot {
        padding-left: 0;
    }

    .fh-topic__more,
    .fh-reply {
        margin-left: 0;
    }

    .fh-reply__hint {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fh-side {
        transition: none;
    }
}

/* ---------- Страница темы ---------- */

.ft-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ft-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ft-head__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ft-cat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fh-link);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.ft-cat:hover {
    color: var(--fh-text);
}

.ft-head h1 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    line-height: 1.2;
    color: #f8fbff;
    overflow-wrap: anywhere;
}

.ft-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    color: var(--fh-muted);
    font-size: 0.86rem;
}

.ft-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fh-link);
    font-weight: 600;
    text-decoration: none;
}

.ft-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.ft-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.ft-actions form {
    margin: 0;
}

.ft-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--forum-border, rgba(148, 163, 184, 0.18));
    border-radius: 999px;
    background: transparent;
    color: var(--fh-muted);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.ft-action small {
    opacity: 0.7;
    font-weight: 500;
}

.ft-action:hover {
    color: var(--fh-text);
    border-color: var(--forum-border-strong, rgba(148, 163, 184, 0.28));
}

.ft-action.is-active {
    color: #fff;
    border-color: transparent;
    background: rgba(96, 165, 250, 0.22);
}

.ft-anime {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    padding: 6px 12px 6px 6px;
    border-radius: 10px;
    background: rgba(96, 165, 250, 0.1);
    color: var(--fh-text);
    font-weight: 600;
    text-decoration: none;
}

.ft-anime img {
    width: 30px;
    height: 42px;
    border-radius: 5px;
    object-fit: cover;
}

.ft-anime span {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.ft-anime small {
    color: var(--fh-muted);
    font-weight: 400;
    font-size: 0.75rem;
}

.ft .ft-body {
    padding-top: 14px;
}

.ft-comments {
    padding-top: 6px;
    border-top: 1px solid var(--fh-line);
}

.ft-comments__title {
    margin: 10px 0 4px;
    color: var(--fh-text);
    font-size: 1.1rem;
}

/* ---------- Создание темы ---------- */

.fc {
    --fh-surface: var(--forum-surface, rgba(15, 23, 42, 0.82));
    --fh-line: rgba(148, 163, 184, 0.16);
    --fh-text: var(--forum-text, #e5eefb);
    --fh-muted: var(--forum-muted, #9fb3ca);
    --fh-link: #93c5fd;
    --fh-accent: var(--forum-accent, #60a5fa);
    --fh-accent-strong: var(--forum-accent-strong, #2563eb);
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    gap: 16px;
}

.fc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.fc-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.fc-counter {
    color: var(--fh-muted);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.fc-counter.is-warn {
    color: #fbbf24;
}

.fc-tabs {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--fh-line);
    border-radius: 10px;
}

.fc-tabs button {
    height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--fh-muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.fc-tabs button[aria-selected="true"] {
    background: rgba(148, 163, 184, 0.16);
    color: var(--fh-text);
}

.fc-preview {
    padding: 14px;
    color: var(--fh-text);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.fc-preview .forum-rich-image {
    display: block;
    max-width: min(100%, 420px);
    border-radius: 8px;
    margin: 6px 0;
}

.fc-preview .forum-rich-quote {
    margin: 6px 0;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.1);
    color: var(--fh-muted);
}

.fc-preview .forum-rich-quote__author {
    color: var(--fh-text);
    font-weight: 600;
}

.fc-preview .forum-rich-spoiler {
    margin: 6px 0;
    padding: 6px 10px;
    border: 1px dashed var(--fh-line);
    border-radius: 8px;
}

.fc-preview__empty {
    margin: 0;
    color: var(--fh-muted);
}

.fc-aside {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 90px;
}

.fc-card {
    padding: 14px;
    border: 1px solid var(--fh-line);
    border-radius: 14px;
    background: var(--fh-surface);
}

.fc-card--muted {
    background: transparent;
}

.fc-card h2 {
    margin: 0 0 10px;
    color: var(--fh-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.fc-feed-preview .fh-topic__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.fc-feed-preview .fh-msg {
    padding-left: 0;
}

.fc-tips {
    margin: 0;
    padding-left: 18px;
    color: var(--fh-text);
    font-size: 0.88rem;
    line-height: 1.5;
}

.fc-tips li + li {
    margin-top: 6px;
}

.fc-markup {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    font-size: 0.82rem;
}

.fc-markup div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.fc-markup dt {
    color: var(--fh-link);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.fc-markup dd {
    margin: 0;
    color: var(--fh-muted);
    text-align: right;
}

@media (max-width: 960px) {
    .fc-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .fc-aside {
        position: static;
    }

    .fc-card--muted {
        display: none;
    }
}

.fc-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fc-back {
    color: var(--fh-muted);
    font-size: 0.88rem;
    text-decoration: none;
}

.fc-back:hover {
    color: var(--fh-text);
}

.fc-head h1 {
    margin: 0;
    font-size: 1.6rem;
    color: #f8fbff;
}

.fc-errors {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
    font-size: 0.92rem;
}

.fc-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fc-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.fc-label {
    padding: 0;
    color: var(--fh-text);
    font-weight: 700;
    font-size: 0.95rem;
}

.fc-label span {
    color: var(--fh-muted);
    font-weight: 400;
}

.fc input[type="text"],
.fc textarea {
    font: inherit;
    color: var(--fh-text);
}

.fc .fc-title {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--fh-line);
    border-radius: 12px;
    background: var(--fh-surface);
    font-size: 1.05rem;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
}

.fc .fc-title:focus,
.fc-picker:focus-within,
.fc-editor:focus-within {
    border-color: var(--fh-accent);
}

.fc-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fc-cat input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fc-cat span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--fh-line);
    border-radius: 999px;
    color: var(--fh-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.fc-cat span:hover {
    color: var(--fh-text);
}

.fc-cat input:checked + span {
    border-color: transparent;
    background: linear-gradient(135deg, var(--fh-accent), var(--fh-accent-strong));
    color: #fff;
}

.fc-cat input:focus-visible + span {
    outline: 2px solid var(--fh-accent);
    outline-offset: 2px;
}

.fc-hint {
    margin: 0;
    color: var(--fh-muted);
    font-size: 0.86rem;
    min-height: 1.2em;
}

.fc-picker {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid var(--fh-line);
    border-radius: 12px;
    background: var(--fh-surface);
}

.fc-picker > i {
    color: var(--fh-muted);
}

.fc-picker input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 0;
    background: transparent;
    outline: none;
}

.fc-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    display: none;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--fh-line);
    border-radius: 12px;
    background: #111a2e;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.fc-results.is-visible {
    display: block;
}

.fc-results .forum-search-results__item {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 6px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--fh-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.fc-results .forum-search-results__item:hover,
.fc-results .forum-search-results__item:focus-visible {
    background: rgba(148, 163, 184, 0.12);
    outline: none;
}

.fc-results img {
    width: 32px;
    height: 46px;
    border-radius: 5px;
    object-fit: cover;
}

.fc-results span {
    display: flex;
    flex-direction: column;
}

.fc-results small,
.fc-results .forum-search-results__empty {
    color: var(--fh-muted);
    font-size: 0.8rem;
}

.fc-anime {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(96, 165, 250, 0.1);
}

.fc-anime[hidden] {
    display: none;
}

.fc-anime img {
    width: 34px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
}

.fc-anime div {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.fc-anime small {
    color: var(--fh-muted);
}

.fc-icon-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--fh-muted);
    cursor: pointer;
}

.fc-icon-btn:hover {
    background: rgba(148, 163, 184, 0.12);
    color: var(--fh-text);
}

.fc-editor {
    border: 1px solid var(--fh-line);
    border-radius: 12px;
    background: var(--fh-surface);
}

.fc-editor.is-dragover {
    border-color: var(--fh-accent);
    background: rgba(96, 165, 250, 0.1);
}

.fc-editor textarea {
    display: block;
    width: 100%;
    min-height: 200px;
    padding: 14px;
    border: 0;
    background: transparent;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.fc-editor textarea::placeholder,
.fc .fc-title::placeholder,
.fc-picker input::placeholder {
    color: var(--fh-muted);
}

.fc-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 14px 12px;
}

.fc-attachments[hidden] {
    display: none;
}

.fc .cm2-thumb {
    position: relative;
    width: 88px;
    height: 64px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.12) center / cover no-repeat;
    border: 1px solid var(--fh-line);
}

.fc .cm2-thumb.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 20px;
    height: 20px;
    border: 2px solid var(--fh-line);
    border-top-color: var(--fh-accent);
    border-radius: 50%;
    animation: fc-spin 0.8s linear infinite;
}

@keyframes fc-spin {
    to { transform: rotate(360deg); }
}

.fc .cm2-thumb-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #475569;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
}

.fc-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    border-top: 1px solid var(--fh-line);
}

.fc-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--fh-muted);
    cursor: pointer;
}

.fc-tool:hover,
.fc-tool:focus-visible {
    background: rgba(148, 163, 184, 0.12);
    color: var(--fh-text);
}

.fc-tools-hint {
    margin-left: auto;
    padding-right: 6px;
    color: var(--fh-muted);
    font-size: 0.78rem;
}

.fc-actions {
    display: flex;
    gap: 10px;
}

@media (max-width: 640px) {
    .fc-head h1 {
        font-size: 1.35rem;
    }

    .fc-tools-hint {
        display: none;
    }

    .fc-actions .fh-btn--primary {
        flex: 1;
    }
}
