.forum-page--popularity .forum-popularity-stage {
    width: 100%;
}

.forum-page--popularity .forum-toolbar + .forum-popularity-stage {
    margin-top: -2px;
}

.fi-gallery-app {
    --fi-bg: rgba(23, 32, 68, 0.92);
    --fi-panel: rgba(31, 43, 88, 0.88);
    --fi-panel-strong: rgba(42, 56, 108, 0.95);
    --fi-line: rgba(146, 164, 228, 0.28);
    --fi-text: #f5f7ff;
    --fi-muted: #b9c5e6;
    --fi-accent: #ffad32;
    --fi-accent-2: #8b6bff;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    min-height: clamp(720px, calc(100vh - 250px), 960px);
    overflow: hidden;
    border: 1px solid var(--fi-line);
    border-radius: 24px;
    background:
        radial-gradient(circle at 80% 8%, rgba(255, 173, 50, 0.2), transparent 28%),
        radial-gradient(circle at 10% 15%, rgba(139, 107, 255, 0.22), transparent 35%),
        linear-gradient(145deg, rgba(37, 50, 101, 0.92), rgba(9, 14, 34, 0.96));
    box-shadow: 0 28px 70px rgba(3, 6, 18, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.fi-gallery-rail {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(13, 19, 45, 0.88), rgba(14, 21, 48, 0.7)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 16px);
    border-right: 1px solid rgba(146, 164, 228, 0.2);
}

.fi-gallery-brand {
    display: flex;
    gap: 22px;
    align-items: center;
    padding: 22px;
    border: 3px solid rgb(20 15 6);
    border-radius: 18px;
    background: rgb(118 77 35 / 87%);
    backdrop-filter: blur(558px) saturate(118%);
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
}

.fi-gallery-brand img {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.4);
}

.fi-gallery-brand strong,
.fi-gallery-brand span {
    display: block;
}

.fi-gallery-brand strong {
    color: var(--fi-text);
    font-size: 1rem;
    font-weight: 900;
}

.fi-gallery-brand span {
    color: var(--fi-muted);
    font-size: 0.78rem;
    line-height: 1.35;
    margin-top: 3px;
}

.fi-gallery-nav {
    display: grid;
    gap: 10px;
}

.fi-gallery-nav button,
.fi-gallery-publish-shortcut,
.fi-soft-button,
.fi-my-tabs button,
.fi-gallery-filter-row button,
.fi-viewer-actions button,
.fi-publish-controls button,
.fi-gallery-modal-panel button[type="submit"],
.fi-bonus-card button {
    border: 1px solid rgba(146, 164, 228, 0.22);
    color: var(--fi-text);
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.fi-gallery-nav button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 11px 13px;
    border-radius: 16px;
    background: rgba(18, 26, 58, 0.72);
    text-align: left;
}

.fi-gallery-filter-row button.is-active,
.fi-my-tabs button.is-active {
    transform: translateY(-1px);
    border-color: rgba(255, 190, 86, 0.65);
    background: linear-gradient(135deg, rgba(255, 173, 50, 0.98), rgba(179, 82, 22, 0.86));
    color: #fff7e9;
    box-shadow: 0 16px 34px rgba(255, 122, 26, 0.2);
}

.fi-gallery-nav i {
    min-width: 18px;
    color: #dce6ff;
}

.fi-gallery-publish-shortcut {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ff5f82, #ffad32);
    box-shadow: 0 18px 40px rgba(255, 93, 96, 0.22);
}

.fi-gallery-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    overflow: hidden;
}

.fi-gallery-toolbar {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(280px, 1fr);
    gap: 14px;
    align-items: center;
    padding: 10px;
}

.fi-gallery-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.fi-gallery-filter-row button,
.fi-gallery-filter-row select,
.fi-my-tabs button,
.fi-soft-button {
    min-height: 42px;
    border-radius: 999px;
    padding: 9px 16px;
    background: rgb(18 14 11);
}

.fi-gallery-filter-row select,
.fi-publish-controls select,
.fi-publish-fields input,
.fi-publish-fields textarea,
.fi-comment-box input {
    border: 1px solid rgba(146, 164, 228, 0.22);
    color: var(--fi-text);
    background: rgba(7, 11, 28, 0.74);
    outline: none;
}

.fi-gallery-filter-row select {
    min-height: 42px;
    border-radius: 999px;
    padding: 0 14px;
    font-weight: 800;
}

.fi-gallery-search {
    position: relative;
    display: block;
}

.fi-gallery-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffbe5a;
}

.fi-gallery-search input {
    width: 100%;
    min-height: 48px;
    padding: 0 18px 0 44px;
    border: 1px solid rgba(255, 190, 86, 0.26);
    border-radius: 18px;
    background: rgba(7, 11, 28, 0.75);
    color: var(--fi-text);
    outline: none;
}

.fi-gallery-panel {
    min-height: 0;
    overflow: auto;
    scrollbar-width: thin;
    border-radius: 30px;
    margin: -14px;
    padding: 12px;
    scrollbar-color: rgba(255, 173, 50, 0.65) rgba(8, 12, 28, 0.45);
}

.fi-gallery-panel[hidden],
.fi-gallery-viewer[hidden],
.fi-gallery-modal[hidden] {
    display: none !important;
}

.fi-gallery-heading,
.fi-profile-strip {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 30px;
    border-radius: 22px;
    border: 1px solid rgba(146, 164, 228, 0.18);
    background: radial-gradient(circle at 78% 10%, rgba(255, 173, 50, 0.18), #0000001f 34%), linear-gradient(135deg, rgb(103 66 29), rgb(106 68 30));
}

.fi-gallery-heading h1,
.fi-profile-strip h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 3.4vw, 3.2rem);
    line-height: 1;
}

.fi-gallery-heading p,
.fi-profile-strip p {
    margin: 9px 0 0;
    color: #d5def8;
    line-height: 1.55;
}

.fi-gallery-counters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fi-gallery-counters span {
    display: grid;
    gap: 3px;
    min-width: 110px;
    padding: 12px 14px;
    border-radius: 16px;
    color: rgb(111 111 111);
    background: rgb(30 21 15);
    border: 1px solid rgb(128 84 39 / 33%);
}

.fi-gallery-counters b {
    color: #ffbe5a;
    font-size: 1.25rem;
}

.fi-gallery-feed-grid {
    column-count: 3;
    column-gap: 18px;
}

.fi-gallery-feed-grid--compact {
    column-count: 3;
}

.fi-gallery-card {
    display: inline-block;
    width: 100%;
    margin: 0 0 18px;
    overflow: hidden;
    border: 1px solid rgb(76 51 23);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(35, 49, 96, 0.9), rgba(12, 18, 42, 0.92)), var(--fi-panel);
    box-shadow: 0 18px 40px rgb(25 19 12);
    break-inside: avoid;
}

.fi-gallery-card[hidden] {
    display: none;
}



.fi-gallery-shot {
    position: relative;
    display: block;
    min-height: 210px;
    max-height: 420px;
    overflow: hidden;
    background: #080d20;
}

.fi-gallery-shot img {
    width: 100%;
    height: auto;
    min-height: 320px;
    display: block;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.28s ease, filter 0.28s ease;
}

.fi-gallery-card:hover .fi-gallery-shot img {
    transform: scale(1.035);
    filter: saturate(1.08);
}

.fi-gallery-rank {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 8px 13px;
    border-radius: 999px;
    color: #151827;
    background: linear-gradient(135deg, #ffe7a1, #ff8f27);
    font-size: 0.75rem;
    font-weight: 1000;
    letter-spacing: 0.08em;
}

.fi-gallery-card-body {
    display: grid;
    gap: 14px;
    padding: 14px;
    background: linear-gradient(180deg, #201408, #4a3116) !important;
    grid-auto-flow: row;
    justify-items: stretch;
    align-items: center;
    justify-content: start;
    border-radius: 14px;
}

.fi-gallery-card-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.5;
    min-width: 397px;
    transform: translateX(-14px);
    background: #25180e;
    border-radius: 12px;
}

.fi-gallery-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    color: #8fb2ff;
    text-decoration: none;
}

.fi-gallery-author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.fi-gallery-card-meta,
.fi-gallery-card-actions,
.fi-viewer-meta,
.fi-viewer-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 9px;
    flex-direction: row;
    justify-content: flex-start;
    align-content: center;
}

.fi-gallery-card-meta {
    color: var(--fi-muted);
    font-size: 0.88rem;
}

.fi-mini-action {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(146, 164, 228, 0.2);
    border-radius: 12px;
    background: rgba(8, 13, 32, 0.62);
    color: #edf2ff;
    cursor: pointer;
    font-weight: 900;
}

.fi-mini-action.is-active,
.fi-viewer-actions button.is-active {
    border-color: rgba(255, 190, 86, 0.7);
    background: linear-gradient(135deg, rgba(255, 173, 50, 0.95), rgba(139, 107, 255, 0.8));
}

.fi-gallery-empty {
    display: grid;
    place-items: center;
    min-height: 280px;
    padding: 32px;
    text-align: center;
    border: 1px dashed rgba(146, 164, 228, 0.26);
    border-radius: 22px;
    background: rgba(8, 13, 32, 0.42);
}

.fi-gallery-empty--inline {
    display: block;
    min-height: 120px;
}

.fi-gallery-empty h2 {
    margin: 0 0 8px;
    color: #fff;
}

.fi-gallery-empty p {
    color: var(--fi-muted);
}

.fi-notification-list {
    display: grid;
    gap: 12px;
}

.fi-notification-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgb(150 150 150 / 20%);
    border-radius: 18px;
    background: rgb(64 44 18);
}

.fi-notification-card img,
.fi-profile-strip img {
    border-radius: 50%;
    object-fit: cover;
}

.fi-notification-card img {
    width: 54px;
    height: 54px;
}

.fi-notification-card strong,
.fi-notification-card span {
    display: block;
}

.fi-notification-card strong {
    color: #fff;
}

.fi-notification-card span {
    margin-top: 4px;
    color: var(--fi-muted);
}

.fi-notification-card em {
    padding: 6px 9px;
    border-radius: 999px;
    color: #111827;
    background: #ffbe5a;
    font-style: normal;
    font-weight: 1000;
}

.fi-notification-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.fi-notification-read-form {
    margin: 0;
}

.fi-notification-action {
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1a1309;
    background: linear-gradient(180deg, #ffbe5a, #f08b2b);
    font-size: 0.78rem;
    font-weight: 1000;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(240, 139, 43, 0.22);
}

.fi-notification-action--read {
    color: #ffffff;
    background: linear-gradient(180deg, #8d6dff, #6c4bdd);
}

@media (max-width: 720px) {
    .fi-notification-card {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .fi-notification-card img {
        width: 44px;
        height: 44px;
    }

    .fi-notification-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

.fi-profile-strip {
    align-items: center;
}

.fi-profile-strip > img {
    width: 82px;
    height: 82px;
    border: 2px solid rgba(255, 190, 86, 0.7);
}

.fi-profile-strip > div {
    min-width: 0;
    flex: 1;
}

.fi-my-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.fi-creator-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.fi-creator-grid div,
.fi-bonus-card {
    border: 1px solid rgba(146, 164, 228, 0.18);
    border-radius: 20px;
    background: rgb(21 20 19);
    padding: 18px;
}

.fi-creator-grid span,
.fi-creator-grid strong {
    display: block;
}

.fi-creator-grid span {
    color: var(--fi-muted);
}

.fi-creator-grid span i {
    margin-right: 8px;
    color: #ffbe5a;
}

.fi-creator-grid strong {
    margin-top: 8px;
    color: #fff;
    font-size: 2rem;
}

.fi-section-title {
    margin: 24px 0 12px;
    color: #fff;
}

.fi-creator-grid--small {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fi-bonus-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    background: radial-gradient(circle at 92% 50%, rgba(255, 173, 50, 0.2), transparent 28%), rgb(95 62 28);
    flex-direction: row;
}

.fi-bonus-card span,
.fi-bonus-card strong {
    display: block;
    color: var(--fi-muted);
}

.fi-bonus-card b {
    display: block;
    color: #ff6fa1;
    font-size: 2.4rem;
    line-height: 1.05;
}

.fi-bonus-card button,
.fi-publish-controls button,
.fi-gallery-modal-panel button[type="submit"] {
    border-radius: 999px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff5f82, #ffad32);
}

.fi-publish-form {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
    gap: 18px;
}

.fi-upload-drop,
.fi-publish-fields {
    border: 1px solid rgba(146, 164, 228, 0.2);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
}

.fi-upload-drop {
    min-height: 420px;
    display: grid;
    place-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.fi-upload-drop input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fi-upload-drop span {
    display: grid;
    gap: 14px;
    place-items: center;
    color: #d7def4;
    font-weight: 900;
    z-index: 2;
    text-align: center;
    padding: 18px;
    border-radius: 18px;
    transition: background 0.2s ease, color 0.2s ease;
}

.fi-upload-drop i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.25);
}

.fi-upload-drop.has-file {
    border-color: rgba(255, 190, 86, 0.55);
    background: rgba(255, 173, 50, 0.08);
}

.fi-upload-drop.has-file span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    color: #fff;
    background: linear-gradient(135deg, rgba(12, 16, 32, 0.82), rgba(255, 153, 42, 0.26));
    border: 1px solid rgba(255, 190, 86, 0.35);
    backdrop-filter: blur(10px);
}

.fi-upload-preview {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    border-radius: 22px;
    filter: saturate(1.06) contrast(1.02);
    z-index: 1;
}

.fi-publish-fields {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.fi-publish-fields label {
    display: grid;
    gap: 8px;
    color: #fff;
    font-weight: 900;
}

.fi-publish-fields input,
.fi-publish-fields textarea {
    width: 100%;
    border-radius: 14px;
    padding: 12px 14px;
}

.fi-publish-fields textarea {
    min-height: 220px;
    resize: vertical;
}

.fi-publish-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.fi-publish-controls span {
    color: var(--fi-muted);
    margin-right: auto;
}

.fi-publish-controls select {
    min-height: 42px;
    border-radius: 999px;
    padding: 0 12px;
}

.fi-gallery-viewer,
.fi-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 24px;
}

.fi-gallery-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    background:
        radial-gradient(circle at 24% 16%, rgba(255, 173, 50, 0.2), transparent 32%),
        radial-gradient(circle at 78% 22%, rgba(107, 93, 255, 0.14), transparent 30%),
        rgba(2, 4, 12, 0.84);
    backdrop-filter: blur(18px) saturate(118%);
    cursor: pointer;
}

.fi-gallery-viewer-panel {
    position: relative;
    z-index: 1;
    width: min(1620px, calc(100vw - 56px));
    max-height: calc(100vh - 56px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(410px, 28vw, 510px);
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 203, 118, 0.18);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(22, 30, 64, 0.98), rgba(7, 10, 25, 0.98)),
        rgba(8, 12, 30, 0.98);
    box-shadow:
        0 42px 120px rgba(0, 0, 0, 0.68),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 80px rgba(255, 136, 24, 0.08);
}

.fi-gallery-viewer-close,
.fi-gallery-modal-panel header button {
    position: absolute;
    top: 20px;
    right: 28px;
    z-index: 3;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(7, 10, 24, 0.78);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.fi-gallery-viewer-close:hover,
.fi-gallery-modal-panel header button:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 190, 86, 0.58);
    background: linear-gradient(135deg, rgba(255, 173, 50, 0.92), rgba(199, 74, 34, 0.9));
}

.fi-gallery-viewer-media {
    position: relative;
    display: grid;
    place-items: center;
    min-height: min(790px, calc(100vh - 56px));
    max-height: calc(100vh - 56px);
    padding: clamp(14px, 1.2vw, 22px);
    background: radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.08), #0b0704 36%), linear-gradient(145deg, rgb(11 7 4), rgba(0, 0, 0, 0.72));
}

.fi-gallery-viewer-media img {
    max-width: 100%;
    max-height: calc(100vh - 112px);
    border-radius: 22px;
    object-fit: contain;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

.fi-gallery-viewer-media span {
    position: absolute;
    left: 28px;
    bottom: 24px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(2, 5, 16, 0.62);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.fi-gallery-viewer-info {
    min-height: 0;
    max-height: calc(100vh - 56px);
    overflow: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left: 1px solid rgb(81 84 92 / 16%);
    background: radial-gradient(circle at 92% 4%, rgba(255, 173, 50, 0.16), #00000036 30%), linear-gradient(180deg, rgb(62 38 12), rgb(9 6 4));
    scrollbar-width: thin;
    border-radius: 10px;
}

.fi-viewer-author {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 6px 32px 4px 0;
}

.fi-viewer-author-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-left: 1px;
}

.fi-viewer-author img {
    width: 58px;
    height: 58px;
    border: 2px solid rgba(255, 190, 86, 0.56);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

.fi-viewer-author strong,
.fi-viewer-author span {
    display: block;
}

.fi-viewer-author strong {
    color: #fff;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.fi-viewer-author span,
.fi-viewer-meta {
    color: var(--fi-muted);
}

.fi-viewer-author a,
.fi-viewer-author button {
    min-height: 34px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 190, 86, 0.32);
    border-radius: 999px;
    background: rgba(255, 173, 50, 0.12);
    color: #ffcf77;
    text-decoration: none;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
}

.fi-viewer-author button.is-active {
    background: linear-gradient(135deg, rgba(255, 173, 50, 0.95), rgba(139, 107, 255, 0.82));
    color: #fff;
}

.fi-gallery-viewer-info h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.45rem, 2vw, 2.25rem);
    line-height: 1.08;
}

.fi-gallery-viewer-info p {
    margin: 0;
    color: #d4ddf7;
    line-height: 1.6;
    white-space: pre-wrap;
}

.fi-viewer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    font-weight: 800;
}

.fi-viewer-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.fi-viewer-actions {
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
}

.fi-viewer-actions button {
    min-height: 12px;
    padding: 8px 9px;
    border-radius: 999px;
    background: rgba(8, 13, 32, 0.66);
    border-color: rgba(146, 164, 228, 0.22);
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    justify-items: center;
    justify-content: center;
    align-content: stretch;
}

.fi-viewer-actions button:hover {
    border-color: rgba(255, 190, 86, 0.5);
    background: rgba(255, 173, 50, 0.12);
}

.fi-comment-box {
    margin-top: 6px;
    padding: 16px;
    border: 1px solid rgb(51 32 10);
    border-radius: 12px;
    background: rgb(11 7 4);
}

.fi-comment-box h3 {
    color: #fff;
    margin: 0 0 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 1rem;
}

.fi-comment-list {
    display: grid;
    gap: 10px;
    min-height: 210px;
    max-height: clamp(220px, 28vh, 360px);
    overflow: auto;
    padding: 4px 6px 4px 0;
    scrollbar-width: thin;
}

.fi-comment-card {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border: 1px solid rgb(69 54 34);
    border-radius: 16px;
    background: rgb(16 13 10);
}

.fi-comment-card img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.fi-comment-card strong {
    color: #fff;
}

.fi-comment-card span {
    display: block;
    color: var(--fi-muted);
    font-size: 0.82rem;
    margin-top: 2px;
}

.fi-comment-card p {
    margin: 6px 0 0;
    color: #d9e2ff;
}

.fi-comment-box form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 14px;
}

.fi-comment-box input {
    min-height: 46px;
    border-radius: 999px;
    padding: 0 16px;
    background: rgba(2, 6, 18, 0.72);
}

.fi-comment-box button[type="submit"] {
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    background: linear-gradient(135deg, #ff5f82, #ffad32);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.fi-gallery-modal-panel {
    position: relative;
    z-index: 1;
    width: min(820px, calc(100vw - 42px));
    max-height: calc(100vh - 64px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    background: #e9ebef;
    color: #2e333b;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.fi-gallery-modal-panel header {
    position: relative;
    min-height: 70px;
    display: grid;
    place-items: center;
    padding: 18px 70px 18px 24px;
    background: linear-gradient(135deg, #11131a, #2f2430);
    color: #fff;
}

.fi-gallery-modal-panel header h2 {
    margin: 0;
    font-size: 1.55rem;
}

.fi-gallery-modal-panel header button {
    top: 13px;
    right: 16px;
}

.fi-gallery-rules-text {
    margin: 24px;
    max-height: min(520px, calc(100vh - 180px));
    overflow: auto;
    padding: 24px;
    border-radius: 18px;
    color: #555b64;
    background: #d9d9d9;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.45;
    scrollbar-width: thin;
}

.fi-gallery-modal-panel--settings form {
    display: grid;
    gap: 18px;
    padding: 28px;
}

.fi-switch-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 58px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #d7d7d7;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.06);
    font-weight: 900;
}

.fi-switch-row span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fi-switch-row input {
    position: absolute;
    opacity: 0;
}

.fi-switch-row em {
    width: 64px;
    height: 32px;
    border-radius: 999px;
    background: #20242c;
    position: relative;
}

.fi-switch-row em::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.18s ease, background 0.18s ease;
}

.fi-switch-row input:checked + em {
    background: #ff5f9b;
}

.fi-switch-row input:checked + em::after {
    transform: translateX(32px);
    background: #fff;
}

.forum-popularity-viewer-open {
    overflow: hidden;
}

@media (max-width: 1180px) {
    .fi-gallery-app {
        grid-template-columns: 1fr;
    }

    .fi-gallery-rail {
        border-right: 0;
        border-bottom: 1px solid rgba(146, 164, 228, 0.2);
    }

    .fi-gallery-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fi-gallery-publish-shortcut {
        margin-top: 0;
    }

    .fi-gallery-feed-grid,
    .fi-gallery-feed-grid--compact {
        column-count: 2;
    }
}

@media (max-width: 840px) {
    .fi-gallery-main {
        padding: 14px;
    }

    .fi-gallery-toolbar,
    .fi-publish-form,
    .fi-gallery-viewer-panel {
        grid-template-columns: 1fr;
    }

    .fi-gallery-feed-grid,
    .fi-gallery-feed-grid--compact {
        column-count: 1;
    }

    .fi-gallery-nav {
        grid-template-columns: 1fr;
    }

    .fi-gallery-heading,
    .fi-profile-strip,
    .fi-bonus-card {
        flex-direction: column;
    }

    .fi-creator-grid,
    .fi-creator-grid--small {
        grid-template-columns: 1fr;
    }

    .fi-gallery-viewer,
    .fi-gallery-modal {
        padding: 10px;
    }

    .fi-gallery-viewer-panel {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        overflow: auto;
    }

    .fi-gallery-viewer-media,
    .fi-gallery-viewer-info {
        max-height: none;
    }

    .fi-gallery-viewer-media {
        min-height: 280px;
    }

    .fi-gallery-viewer-media img {
        max-height: 62vh;
    }
}

/* Dark gold integration with the refreshed forum shell. */
.forum-page--popularity .fi-gallery-app {
    --fi-bg: rgba(10, 10, 10, 0.94);
    --fi-panel: rgba(18, 16, 14, 0.9);
    --fi-panel-strong: rgba(28, 22, 16, 0.95);
    --fi-line: rgba(255, 181, 74, 0.16);
    --fi-line-strong: rgba(255, 195, 110, 0.28);
    --fi-text: #f5ede2;
    --fi-muted: rgba(245, 234, 217, 0.64);
    --fi-accent: #f0a23a;
    --fi-accent-2: #c46418;
    --fi-accent-soft: rgba(255, 161, 52, 0.14);
    --fi-danger: #ff735f;
    background:
        radial-gradient(circle at 88% 12%, rgba(255, 161, 52, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(18, 16, 14, 0.94), rgba(7, 7, 7, 0.94));
    border-color: rgba(255, 181, 74, 0.16);
}

.forum-page--popularity .fi-gallery-rail,
.forum-page--popularity .fi-gallery-panel,
.forum-page--popularity .fi-gallery-card,
.forum-page--popularity .fi-gallery-viewer-panel,
.forum-page--popularity .fi-gallery-modal-panel {
    border-color: rgb(49 49 49 / 34%);
    background: radial-gradient(circle at 92% 0%, rgb(18 18 18), #0f0f0f 34%), linear-gradient(180deg, rgb(255 255 255), rgb(143 88 17));
    padding: 9px;
    border-radius: 21px;
}

.forum-page--popularity .fi-gallery-nav button,
.forum-page--popularity .fi-gallery-filter-row button,
.forum-page--popularity .fi-gallery-publish-shortcut,
.forum-page--popularity .fi-gallery-modal-panel button[type="submit"] {
    border-color: rgba(255, 190, 105, 0.2);
    background: linear-gradient(180deg, rgba(24, 23, 21, 0.94), rgba(10, 10, 10, 0.94));
    color: #f6d08f;
}

.forum-page--popularity .fi-gallery-nav button:hover,
.forum-page--popularity .fi-gallery-nav button.is-active,
.forum-page--popularity .fi-gallery-filter-row button.is-active,
.forum-page--popularity .fi-gallery-publish-shortcut,
.forum-page--popularity .fi-gallery-modal-panel button[type="submit"] {
    background: linear-gradient(180deg, #f0a23a, #b95b17);
    color: #fffaf0;
    box-shadow: 0 14px 30px rgba(174, 84, 18, 0.22);
}

.forum-page--popularity .fi-gallery-search,
.forum-page--popularity .fi-gallery-filter-row select,
.forum-page--popularity .fi-gallery-modal-panel input,
.forum-page--popularity .fi-gallery-modal-panel textarea,
.forum-page--popularity .fi-gallery-modal-panel select {
    border-color: rgba(255, 181, 74, 0.14);
    background: rgba(8, 8, 8, 0.78);
    color: #fff5e7;
}

/* Gallery usability polish: stable top order, warm active states, and full-screen overlays. */
.forum-page--popularity .fi-gallery-app {
    --fi-warm-text: #f7e2b9;
    --fi-warm-soft: #d3a762;
    --fi-warm-bright: #ffd27c;
    --fi-warm-deep: #6b3b12;
    --fi-like-active: #ff3d2e;
    --fi-like-deep: #6e0303;
    --fi-save-active: #ff6fd8;
    --fi-save-deep: #6e4dff;
}

.forum-page--popularity .fi-gallery-nav button,
.forum-page--popularity .fi-gallery-filter-row button,
.forum-page--popularity .fi-my-tabs button,
.forum-page--popularity .fi-soft-button,
.forum-page--popularity .fi-gallery-publish-shortcut {
    border-color: rgba(216, 161, 78, 0.42);
    background: linear-gradient(180deg, rgba(24, 19, 13, 0.96), rgba(8, 7, 6, 0.96));
    color: var(--fi-warm-text);
    box-shadow: inset 0 1px 0 rgba(255, 226, 168, 0.08), 0 10px 24px rgba(0, 0, 0, 0.22);
}

.forum-page--popularity .fi-gallery-nav button:hover,
.forum-page--popularity .fi-gallery-nav button.is-active,
.forum-page--popularity .fi-gallery-nav button:focus-visible,
.forum-page--popularity .fi-gallery-filter-row button:hover,
.forum-page--popularity .fi-gallery-filter-row button.is-active,
.forum-page--popularity .fi-my-tabs button:hover,
.forum-page--popularity .fi-my-tabs button.is-active,
.forum-page--popularity .fi-soft-button:hover,
.forum-page--popularity .fi-gallery-publish-shortcut:hover,
.forum-page--popularity .fi-gallery-publish-shortcut.is-active {
    transform: translateY(-1px);
    border-color: rgba(255, 212, 132, 0.9);
    background: linear-gradient(180deg, #f7ca78 0%, #c48637 48%, #764012 100%);
    color: #fff9ea;
    box-shadow:
        0 0 0 1px rgba(255, 222, 148, 0.2) inset,
        0 0 20px rgba(255, 183, 82, 0.25),
        0 16px 34px rgba(0, 0, 0, 0.34);
}

.forum-page--popularity .fi-gallery-nav button.is-active {
    color: #ffffff;
}

.forum-page--popularity .fi-gallery-nav button.is-active i,
.forum-page--popularity .fi-gallery-nav button:hover i {
    color: #fff4ce;
}

.forum-page--popularity .fi-gallery-rail {
    padding: 18px;
    border-color: rgba(216, 161, 78, 0.24);
    background:
        radial-gradient(circle at 20% 0%, rgba(255, 196, 104, 0.1), transparent 35%),
        linear-gradient(180deg, rgba(19, 14, 9, 0.96), rgba(6, 6, 6, 0.96));
}

.forum-page--popularity .fi-gallery-panel {
    padding: 12px;
    border-color: rgba(216, 161, 78, 0.18);
    background: linear-gradient(180deg, rgba(12, 10, 8, 0.72), rgba(5, 5, 5, 0.64));
}

.forum-page--popularity .fi-gallery-feed-grid,
.forum-page--popularity .fi-gallery-feed-grid--compact {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    column-count: initial;
}

.forum-page--popularity .fi-gallery-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border-color: rgba(128, 83, 31, 0.72);
    background: linear-gradient(180deg, #15100c, #080706);
    break-inside: auto;
}

.forum-page--popularity .fi-gallery-card-body {
    background: linear-gradient(180deg, #211409, #3a250f) !important;
    align-items: stretch !important;
    justify-items: stretch !important;
}

.forum-page--popularity .fi-gallery-shot {
    width: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: 16 / 10;
    border: 0;
    cursor: zoom-in;
}

.forum-page--popularity .fi-gallery-shot::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(circle at 50% 50%, transparent 35%, rgba(0, 0, 0, 0.34));
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.forum-page--popularity .fi-gallery-shot::after {
    content: "\f06e";
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 212, 132, 0.62);
    border-radius: 50%;
    background: rgba(9, 8, 7, 0.72);
    color: #ffd27c;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.forum-page--popularity .fi-gallery-card:hover .fi-gallery-shot::before,
.forum-page--popularity .fi-gallery-card:hover .fi-gallery-shot::after {
    opacity: 1;
}

.forum-page--popularity .fi-gallery-card:hover .fi-gallery-shot::after {
    transform: translate(-50%, -50%) scale(1);
}

.forum-page--popularity .fi-gallery-shot img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}

.forum-page--popularity .fi-gallery-rank {
    z-index: 3;
    border: 1px solid rgba(255, 240, 190, 0.5);
    background: linear-gradient(180deg, #ffe4a0, #f2a646);
    color: #2a1707;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.forum-page--popularity .fi-gallery-card-title {
    width: 100%;
    min-width: 0;
    transform: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff6e5;
    text-align: left;
    cursor: zoom-in;
}

.forum-page--popularity .fi-gallery-card-title:hover {
    color: #ffd27c;
}

.forum-page--popularity .fi-gallery-card-post {
    display: grid;
    gap: 5px;
    justify-self: stretch;
    align-self: stretch;
    width: calc(100% + 28px) !important;
    min-width: 0 !important;
    min-height: 64px;
    height: auto;
    margin: -14px 354px 0 -14px !important;
    box-sizing: border-box;
    padding: 9px 9px;
    border: 1px solid rgba(197, 128, 42, 0.56);
    border-radius: 0 0 12px 12px;
    background: radial-gradient(circle at 12% 0%, rgba(255, 191, 92, 0.14), transparent 36%), linear-gradient(180deg, rgba(20, 13, 7, 0.98), rgba(8, 7, 6, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 225, 166, 0.08), 0 10px 24px rgba(0, 0, 0, 0.24);
    transform: none !important;
}

.forum-page--popularity .fi-gallery-card-post:hover {
    border-color: rgba(255, 210, 124, 0.82);
    background:
        radial-gradient(circle at 16% 0%, rgba(255, 201, 116, 0.2), transparent 40%),
        linear-gradient(180deg, rgba(33, 20, 9, 0.98), rgba(11, 8, 5, 0.98));
}

.forum-page--popularity .fi-gallery-card-post strong,
.forum-page--popularity .fi-gallery-card-post span {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.forum-page--popularity .fi-gallery-card-post strong {
    color: #fff4df;
    font-size: 0.94rem;
    line-height: 1.25;
}

.forum-page--popularity .fi-gallery-card-post span {
    color: rgba(245, 220, 180, 0.76);
    font-size: 0.78rem;
    line-height: 1.32;
}

.forum-page--popularity .fi-mini-action,
.forum-page--popularity .fi-viewer-actions button {
    border-color: rgba(114, 109, 103, 0.52);
    background: linear-gradient(180deg, #181818, #070707);
    color: #b6b3ae;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.forum-page--popularity .fi-mini-action i,
.forum-page--popularity .fi-viewer-actions button i {
    color: #8f8b84;
    transition: color 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}

.forum-page--popularity .fi-mini-action:hover,
.forum-page--popularity .fi-viewer-actions button:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 210, 124, 0.56);
    color: #f6e5c1;
}

.forum-page--popularity .fi-mini-action--like.is-active,
.forum-page--popularity .fi-viewer-action--like.is-active {
    border-color: rgba(255, 99, 74, 0.9);
    background:
        radial-gradient(circle at 30% 0%, rgba(255, 168, 120, 0.45), transparent 42%),
        linear-gradient(135deg, var(--fi-like-active), #b20b08 52%, var(--fi-like-deep));
    color: #fff1e7;
    box-shadow:
        0 0 0 1px rgba(255, 212, 184, 0.18) inset,
        0 0 18px rgba(255, 54, 36, 0.38),
        0 12px 28px rgba(0, 0, 0, 0.36);
}

.forum-page--popularity .fi-mini-action--like.is-active i,
.forum-page--popularity .fi-viewer-action--like.is-active i {
    color: #ffe3d8;
    filter: drop-shadow(0 0 8px rgba(255, 62, 46, 0.72));
}

.forum-page--popularity .fi-mini-action--save i,
.forum-page--popularity .fi-viewer-action--save i {
    color: #1b1a21;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.35);
}

.forum-page--popularity .fi-mini-action--save.is-active,
.forum-page--popularity .fi-viewer-action--save.is-active {
    border-color: rgba(255, 130, 229, 0.95);
    background:
        radial-gradient(circle at 24% 0%, rgba(255, 216, 249, 0.55), transparent 38%),
        linear-gradient(135deg, var(--fi-save-active), #bc4ed8 48%, var(--fi-save-deep));
    color: #fff4ff;
    box-shadow:
        0 0 0 1px rgba(255, 220, 255, 0.18) inset,
        0 0 20px rgba(255, 106, 216, 0.42),
        0 12px 28px rgba(0, 0, 0, 0.36);
}

.forum-page--popularity .fi-mini-action--save.is-active i,
.forum-page--popularity .fi-viewer-action--save.is-active i {
    color: #ffe4ff;
    filter: drop-shadow(0 0 9px rgba(255, 108, 216, 0.78));
}

.forum-page--popularity .fi-mini-action:active,
.forum-page--popularity .fi-viewer-actions button:active,
.forum-page--popularity .fi-gallery-nav button:active {
    transform: translateY(0) scale(0.98);
}

.fi-gallery-viewer,
.fi-gallery-modal {
    z-index: 2147483000;
    align-items: center;
    justify-items: center;
}

.fi-gallery-overlay {
    background: rgba(10, 10, 11, 0.74);
    backdrop-filter: blur(18px) saturate(0.72);
}

.fi-gallery-viewer-panel {
    width: min(1560px, calc(100vw - 48px));
    grid-template-columns: minmax(0, 1fr) clamp(360px, 30vw, 500px);
    border-color: rgba(222, 166, 82, 0.36);
    background: linear-gradient(135deg, rgba(18, 15, 12, 0.98), rgba(5, 5, 5, 0.98));
}

.fi-gallery-viewer-info {
    border-left-color: rgba(222, 166, 82, 0.22);
    background:
        radial-gradient(circle at 100% 0%, rgba(238, 165, 65, 0.16), transparent 34%),
        linear-gradient(180deg, #2c1b0d, #090706);
}

.fi-gallery-modal-panel {
    border-color: rgba(222, 166, 82, 0.36);
    background: linear-gradient(180deg, #17120c, #090806);
    color: #f3dfbd;
}

.fi-gallery-modal-panel header {
    background: linear-gradient(180deg, #2b1b0d, #0c0906);
    color: #ffe5b7;
}

.fi-gallery-rules-text {
    color: #efd7af;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(222, 166, 82, 0.22);
}

@media (max-width: 1180px) {
    .forum-page--popularity .fi-gallery-feed-grid,
    .forum-page--popularity .fi-gallery-feed-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 840px) {
    .forum-page--popularity .fi-gallery-feed-grid,
    .forum-page--popularity .fi-gallery-feed-grid--compact {
        grid-template-columns: 1fr;
    }

    .fi-gallery-viewer-panel {
        grid-template-columns: 1fr;
    }
}

/* Final modal/button guard. Keep gallery popups centered above every site layer. */
html:has(.fi-gallery-viewer:not([hidden])),
html:has(.fi-gallery-modal:not([hidden])) {
    overflow: hidden !important;
}

body.forum-popularity-viewer-open {
    overflow: hidden !important;
}

body .fi-gallery-viewer:not([hidden]),
body .fi-gallery-modal:not([hidden]) {
    position: fixed !important;
    inset: auto !important;
    left: 62.5vw !important;
    top: 62.5dvh !important;
    right: auto !important;
    bottom: auto !important;
    width: 125vw !important;
    min-width: 125vw !important;
    height: 125vh !important;
    height: 125dvh !important;
    min-height: 125dvh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: clamp(14px, 2.2vw, 34px) !important;
    margin: 0 !important;
    z-index: 2147483647 !important;
    transform: translate(-50%, -50%) !important;
    overflow: hidden !important;
    isolation: isolate !important;
}

body .fi-gallery-overlay {
    position: fixed !important;
    inset: auto !important;
    left: 62.5vw !important;
    top: 62.5dvh !important;
    right: auto !important;
    bottom: auto !important;
    width: 125vw !important;
    min-width: 125vw !important;
    height: 125vh !important;
    height: 125dvh !important;
    min-height: 125dvh !important;
    margin: 0 !important;
    border: 0 !important;
    background: rgba(10, 10, 11, 0.76) !important;
    backdrop-filter: blur(18px) saturate(0.72) !important;
    z-index: 0 !important;
    transform: translate(-50%, -50%) !important;
}

body .fi-gallery-viewer-panel,
body .fi-gallery-modal-panel {
    position: relative !important;
    z-index: 1 !important;
    margin: auto !important;
    transform: none !important;
}

body .fi-gallery-viewer-panel {
    width: min(1560px, calc(100vw - 48px)) !important;
    max-width: calc(100vw - 48px) !important;
    max-height: calc(100dvh - 48px) !important;
}

body .fi-gallery-modal-panel {
    width: min(760px, calc(100vw - 42px)) !important;
    max-width: calc(100vw - 42px) !important;
    max-height: min(82dvh, 760px) !important;
    overflow: hidden !important;
}

body .fi-gallery-rules-text {
    max-height: calc(82dvh - 132px) !important;
}

body.forum-page--popularity .fi-gallery-nav button:hover,
body.forum-page--popularity .fi-gallery-nav button.is-active,
body.forum-page--popularity .fi-gallery-nav button:focus-visible,
body.forum-page--popularity .fi-gallery-publish-shortcut:hover,
body.forum-page--popularity .fi-gallery-publish-shortcut.is-active {
    border-color: rgba(255, 220, 148, 0.96) !important;
    background: linear-gradient(180deg, #ffe2a1 0%, #d39445 48%, #713b10 100%) !important;
    color: #fffaf0 !important;
    box-shadow:
        0 0 0 1px rgba(255, 242, 198, 0.24) inset,
        0 0 22px rgba(255, 190, 96, 0.44),
        0 14px 34px rgba(0, 0, 0, 0.42) !important;
}

body.forum-page--popularity .fi-gallery-nav button:hover *,
body.forum-page--popularity .fi-gallery-nav button.is-active *,
body.forum-page--popularity .fi-gallery-publish-shortcut:hover *,
body.forum-page--popularity .fi-gallery-publish-shortcut.is-active * {
    color: #fffaf0 !important;
}

body.forum-page--popularity .fi-mini-action--like:hover,
body.forum-page--popularity .fi-viewer-action--like:hover,
body.forum-page--popularity .fi-mini-action--like.is-active,
body.forum-page--popularity .fi-viewer-action--like.is-active {
    border-color: rgba(255, 99, 74, 0.95) !important;
    background:
        radial-gradient(circle at 30% 0%, rgba(255, 170, 130, 0.52), transparent 42%),
        linear-gradient(135deg, #ff3d2e, #b20b08 52%, #6e0303) !important;
    color: #fff1e7 !important;
    box-shadow:
        0 0 0 1px rgba(255, 212, 184, 0.22) inset,
        0 0 20px rgba(255, 54, 36, 0.44),
        0 12px 30px rgba(0, 0, 0, 0.4) !important;
}

body.forum-page--popularity .fi-mini-action--save:hover,
body.forum-page--popularity .fi-viewer-action--save:hover,
body.forum-page--popularity .fi-mini-action--save.is-active,
body.forum-page--popularity .fi-viewer-action--save.is-active {
    border-color: rgba(255, 130, 229, 0.96) !important;
    background:
        radial-gradient(circle at 24% 0%, rgba(255, 216, 249, 0.6), transparent 38%),
        linear-gradient(135deg, #ff6fd8, #bc4ed8 48%, #6e4dff) !important;
    color: #fff4ff !important;
    box-shadow:
        0 0 0 1px rgba(255, 220, 255, 0.2) inset,
        0 0 22px rgba(255, 106, 216, 0.48),
        0 12px 30px rgba(0, 0, 0, 0.4) !important;
}

body.forum-page--popularity .fi-mini-action--like:hover *,
body.forum-page--popularity .fi-mini-action--like.is-active *,
body.forum-page--popularity .fi-viewer-action--like:hover *,
body.forum-page--popularity .fi-viewer-action--like.is-active *,
body.forum-page--popularity .fi-mini-action--save:hover *,
body.forum-page--popularity .fi-mini-action--save.is-active *,
body.forum-page--popularity .fi-viewer-action--save:hover *,
body.forum-page--popularity .fi-viewer-action--save.is-active * {
    color: inherit !important;
}

@media (max-width: 840px) {
    body .fi-gallery-viewer:not([hidden]),
    body .fi-gallery-modal:not([hidden]) {
        padding: 10px !important;
        align-items: center !important;
    }

    body .fi-gallery-viewer-panel {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100dvh - 20px) !important;
        overflow: auto !important;
    }
}
