/* ==== Переменные ==== */
:root {
    --bg:        #f7f9fb;
    --bg-soft:   #eef2f6;
    --fg:        #1f2937;
    --muted:     #6b7280;
    --border:    #e5e7eb;
    --accent:    #2a7;
    --accent-2:  #1d6b56;
    --accent-bg: #eef9f4;
    --danger:    #c0392b;
    --warn:      #d97706;
    --ok:        #16a34a;
    --header-h:  60px;
    --radius:    8px;
    --radius-sm: 6px;
}

/* ==== Сброс и базовое ==== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img { height: auto; display: block; }
a { color: #2747a9; text-decoration: none; transition: all 0.5s; }
a:hover { text-decoration: none; color: #3a6bff; }
button { font-family: inherit; }
ul { margin: 24px 0px 24px -15px; }
ol { margin: 24px 0px 24px -15px; }

/* Убираем рамку :focus для мыши, но оставляем доступность через outline для клавиатуры */
:focus { outline: none; }
:focus-visible {
	outline: 0px solid #3a6bff;
	outline-offset: 0px;
	outline: 0px solid #3b82f6;
	box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

/* ==== Header ==== */
.site-header {
    width: 100%;
    height: var(--header-h);
    background: #e8efff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 0px 5px rgba(0, 0, 0, 0.05);
}

.site-header .logo {
    font-weight: 700;
    font-size: 18px;
    color: var(--fg);
    letter-spacing: 1px;
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.5s;
}

.site-header .logo:hover { color: #3a6bff; text-decoration: none; }

#history {
    scroll-margin-top: calc(var(--header-h) + 10px);
}

/* ==== Header — поиск ==== */
.header-search {
    display: flex;
    align-items: center;
    height: 40px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    transition: all 0.5s;
    flex: 0 0 auto;
    max-width: 40px;
    overflow: hidden;
    margin-left: auto;
}

.header-search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--fg);
    font-size: 16px;
    padding: 8px 10px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.5s;
	width: 40px;
	height: 40px;
}
.header-search-toggle:hover { color: var(--accent); }

.header-search input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: var(--fg);
    font-size: 14px;
    outline: none;
    opacity: 0;
    transition: all 0.5s;
    pointer-events: none;
}

.header-search-submit {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    padding: 8px 12px;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.5s;
}
.header-search-submit:hover { color: var(--accent); }

.header-search.is-open {
    flex: 1 1 auto;
    max-width: 100%;
    border-color: var(--border);
    background: #fff;
}

.hs { width: 100%; }
.btn-ed { height: 37px !important; }
.btn-post { height: 28px !important; }

.header-search.is-open .header-search-toggle { display: none; }

.header-search.is-open input {
    opacity: 1;
    pointer-events: auto;
}

.header-search.is-open .header-search-submit {
    display: inline-flex;
    align-items: center;
}

.header-search button {
    border: 0px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}
.header-search button:hover { color: #3a6bff; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
	height: 40px;
}

.header-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--fg);
    position: relative;
    line-height: 1;
    transition: all 0.5s;
}

.header-icon:hover { color: #3a6bff; }

.header-icon .badge {
    position: absolute;
    top: -17px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    border-radius: 10px;
    padding: 1px 6px;
    font-weight: 700;
    line-height: 1.2;
}

/* ==== Кнопки ==== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    background: #3a6bff;
    color: #fff;
    border: 1px solid #3a6bff;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.5s;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
    gap: 6px;
}

.btn:hover { background: #5e86ff; border-color: #5e86ff; color: #fff; text-decoration: none; }
.btn-small { padding: 6px 12px; font-size: 14px; height: 28px; }
.btn-cancel { background: #9ca3af; border-color: #9ca3af; }
.btn-cancel:hover { background: #8c96a9; border-color: #818897; color: #fff; }
.btn-danger:hover { background: #a5281c; border-color: #a5281c; color: #fff; }
.btn:disabled { opacity: .6; cursor: not-allowed; pointer-events: none; }

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #3a6bff;
    font-size: 15px;
    transition: all 0.5s;
}

.icon-btn:hover { color: #3a6bff; }
.btn-w { width: 100px; }
.btn-width { width: 28px; }

/* ==== Меню пользователя ==== */
.user-menu { position: relative; }
.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--fg);
    font-size: 14px;
    justify-content: center;
    width: 42px;
    height: 42px;
}
.user-menu-toggle:hover { color: var(--accent); }
.user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 236px;
    z-index: 200;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s;
    pointer-events: none;
}

.user-menu-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.user-menu-head {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}
.user-menu-name {
    display: block;
    font-weight: 600;
    color: var(--fg);
    font-size: 14px;
    transition: all 0.5s;
    margin-bottom: 4px;
}
.user-menu-name:hover { color: #3a6bff; text-decoration: none; }
.user-menu-id {
    display: block;
    font-size: 12px;
    color: var(--muted);
}
.user-menu-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}
.user-menu-list a {
    display: block;
    padding: 8px 14px;
    color: var(--fg);
    font-size: 14px;
    transition: all 0.5s;
}
.user-menu-list a:hover { background: var(--bg); text-decoration: none; color: #3a6bff; }
.user-menu-admin { color: #3a6bff !important; font-weight: 600; }
.btn-admin-width {width: 120px;}
.btn-admin-width-2 {width: 136px;}

/* Пункты меню, видимые только на мобильных */
.user-menu-item-mobile-only {
    display: none;
}

.user-menu-separator {
    list-style: none;
    height: 1px;
    padding: 0 !important;
    margin: 6px 0;
    background: var(--border);
    pointer-events: none;
}

/* ==== Аватары ==== */
.avatar-mini, .avatar-small, .avatar-big {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #3a6bff;
    color: #fff;
    border-radius: 50%;
    overflow: hidden;
    font-weight: 600;
    flex-shrink: 0;
    text-decoration: none;
}
.avatar-mini {
    width: 34px;
    height: 34px;
    font-size: 13px;
    border: 0px solid #9cb4ff;
}

.avatar-small { width: 40px;  height: 40px;  font-size: 16px; }
.avatar-big   { width: 96px;  height: 96px;  font-size: 36px; border: 0px solid #9cb4ff; }
img.avatar-mini, img.avatar-small, img.avatar-big { display: block; }

/* ==== Основной layout ==== */
.site-main { min-height: calc(100vh - var(--header-h) - 60px); }
.layout-3col {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
}
.col-left, .col-right, .col-center { min-width: 0; }

/* ============================================================
   Левый сайдбар — прилипающий, с тонкой полосой прокрутки
   ============================================================ */
.col-left {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    align-self: start;
    max-height: calc(100vh - var(--header-h) - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    scroll-behavior: smooth;
}

.col-left::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.col-left::-webkit-scrollbar-track {
    background: transparent;
}

.col-left::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.col-left::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
    background-clip: padding-box;
}

.col-left::-webkit-scrollbar-corner {
    background: transparent;
}

.col-right {
    position: static;
    max-height: none;
    overflow: visible;
    align-self: stretch;
}

/* ==== Sidebar ==== */
.side-nav ul, .side-links, .side-cats { list-style: none; margin: 0; padding: 0; }
.side-nav a, .side-links a, .side-cats a {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0px 8px 0px;
    color: var(--fg);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all 0.5s;
    font-weight: 600;
}
.side-nav a:hover, .side-links a:hover, .side-cats a:hover {
    text-decoration: none;
    color: #3a6bff;
}
.side-block { margin-top: 20px; }
.side-block h3 {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--muted);
    font-weight: 600;
}
.side-cats .cat-count {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
}
.side-more {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    color: #1f2937;
}

/* ==== Карточка поста ==== */
.post-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.05);
    max-height: 290px;
}
.post-card-head {
    display: flex;
    align-items: center;
	justify-content: space-between;
    gap: 2px;
    margin-bottom: 8px;
}
.post-card-head .post-date {
    white-space: nowrap;
    padding-top: 4px;
    margin-left: auto;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--fg);
    text-decoration: none;
}
.post-author:hover { color: #3a6bff; text-decoration: none; }
.post-author-name { font-weight: 600; font-size: 15px; }

.post-card-actions {
    display: flex;
    align-items: center;
}

.post-category {
    display: inline-block;
    padding: 2px 10px;
    margin-bottom: 6px;
    font-size: 12px;
    background: var(--bg-soft);
    color: var(--muted);
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid var(--border);
}

.post-vote {
    display: inline-block;
    padding: 2px 10px;
    margin-bottom: 6px;
    font-size: 12px;
    background: var(--bg-soft);
    color: var(--muted);
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid var(--border);
}

.post-title {
    font-size: 18px;
    line-height: 1.3;
    margin: 10px 0px 7px 0px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.post-title a {
    color: var(--fg);
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.post-title a:hover { color: #3a6bff; text-decoration: none; }

.post-excerpt { font-size: 15px; text-align: justify; }

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.post-meta {display: flex; align-items: center; justify-content: center; gap: 4px;}
.post-views { color: var(--muted); font-size: 13px; }
.post-read-more { margin-top: 8px; font-size: 13px; }
.post-status-draft {
    background: #fde68a;
    color: #92400e;
    padding: 0px 4px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #ffd7b6;
}

/* ==== Полный пост ==== */
.post-full {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}
.post-full-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 12px;
    flex-wrap: wrap;
}

.post-date { color: var(--muted); font-size: 11px; }

.post-full-title {
    font-size: 18px;
    line-height: 1.3;
    margin: 10px 0px 24px 0px;
}
.post-full-content {
    font-size: 15px;
    line-height: 1.6;
    color: #1f2937;
    word-wrap: break-word;
}

.post-full-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.post-actions-row { display: flex; gap: 6px; }
.post-reactions { margin-top: 14px; }

/* ==== Реакции ==== */
.reactions-block { margin-top: 12px; }
.reactions-row { display: flex; flex-wrap: wrap; gap: 4px; }
.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.5s;
    height: 26px;
}
.reaction-btn:hover {
    color: #3a6bff;
    border-color: #f2f5ff;
    background: #f2f5ff;
}

.reaction-btn.is-active {
    color: #3a6bff;
    border-color: #f2f5ff;
    background: #f2f5ff;
}

.reaction-count { font-size: 12px; }
.reactions-total { margin-top: 4px; font-size: 12px; color: var(--muted); }
.reactions-compact .reaction-btn svg { width: 14px; height: 14px; }

/* ==== Комментарии ==== */
.comments-section { margin-top: 24px; }
.comments-title { font-size: 18px; margin: 0 0 12px; }
.comment-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    background: #fff;
    color: var(--fg);
}
.comment-form-actions {
    margin-top: 6px;
    display: flex;
    gap: 8px;
    justify-content: end;
}

.comment {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 80px;
}
.comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.comment-date { color: var(--muted); font-size: 12px; margin-bottom: -3px; }
.comment-actions { margin-left: auto; display: flex; }
.comment-body {
    margin: 6px 0;
    font-size: 14px;
    color: #1f2937;
}

.comment-body a[target="_blank"]::after {
    content: " ↗";
    font-size: 0.85em;
    opacity: 0.7;
}
.comment-reactions { margin-top: 4px; }
.comment-children {
    margin-left: 22px;
    padding-left: 10px;
    border-left: 1px solid var(--border);
    margin-top: 8px;
}
.comment-edit-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    color: var(--fg);
    margin: 8px 0px 0px 0px;
}
.comment-edit-actions { margin-top: 6px; display: flex; gap: 8px; }

/* ==== Формы ==== */
.auth-block, .auth-form {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin: 30px auto 0 auto;
    max-width: 400px;
}

.auth-form + .auth-form { margin-top: 20px; }

.auth-form-2 {
    max-width: 100%;
}

.auth-title {
    text-align: center;
    margin: 0 0 20px;
    font-size: 22px;
}
.settings-subtitle {
    margin: 24px 0 10px;
    font-size: 17px;
    color: var(--fg);
    text-align: center;
}
.form-row { margin-bottom: 14px; }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    background: #fff;
    color: var(--fg);
    font-family: inherit;
}
.form-row input.field-error,
.form-row input.has-error { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; display: block; margin-top: 3px; }
.auth-error { color: var(--danger); text-align: center; }
.auth-success { text-align: center; }
.auth-hint { text-align: center; color: var(--muted); font-size: 14px; }
.auth-hint-just { text-align: justify; }

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--fg);
    cursor: pointer;
}
.form-row-inline { display: flex; align-items: center; }

.select-custom {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--fg);
    font-size: 15px;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%236b7280' stroke-width='1.5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
    cursor: pointer;
}

/* ==== Редактор ==== */
.editor-form {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    max-width: none;
    margin: 0;
}
.editor-textarea {
    width: 100%;
    min-height: 360px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
    background: #fff;
    color: var(--fg);
    resize: vertical;
}
.editor-delete-form { margin-top: 16px; }

.js-autosave-status {
    color: var(--muted);
    font-size: 12px;
    margin-left: 8px;
    align-self: center;
    display: none;
}

/* ==== Пагинация ==== */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin: 20px 0px 0px 0px;
    flex-wrap: wrap;
}
.page-link, .page-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 6px;
    background: #3a6bff;
    color: #fff;
    border: 1px solid #3a6bff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    transition: all 0.5s;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
    height: 35px;
}

.page-link-2 {
    width: 35px;
    height: 35px;
}

.page-link:hover {
    background: #5e86ff;
    border-color: #5e86ff;
    color: #fff;
}

.page-current {
    background: #3a6bff;
    color: #fff;
    border-color: #3a6bff;
    cursor: pointer;
    transition: all 0.5s;
}

.page-current:hover {
    background: #5e86ff;
    border-color: #5e86ff;
    color: #fff;
}

/* ==== Модалки ==== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px 16px;
}

.modal-overlay:has(.gift-modal) {
    align-items: flex-start;
}

[hidden] {
    display: none !important;
}

.modal {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 420px;
    padding: 20px;
    margin: 0 16px;
}
.modal-title {
    text-align: center;
    margin: 0 0 16px;
    font-size: 18px;
}
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.modal-actions .btn { min-width: 120px; }

/* ==== Toast ==== */
.toast {
    display: inline-block;
    margin-left: 8px;
    color: var(--danger);
    font-size: 13px;
    vertical-align: middle;
}

/* ==== Уведомления ==== */

.notif-wrap {
    position: relative;
	height: 34px;
}

.notif-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 14px);
    width: 340px;
    max-width: calc(100vw - 20px);
    max-height: 480px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 0;
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s;
    pointer-events: none;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.notif-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item { border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: none; }

.notif-item.is-unread {
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
    margin-bottom: 1px;
    transition: all 0.5s;
}

.notif-item.is-unread:hover {
    background: #f4f7ff;
}

.notif-link {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    color: var(--fg);
    font-size: 14px;
}

.notif-text {
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    line-height: 1.3;
}

.notif-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
    margin: 0;
}

/* ==== Сообщения (общие стили) ==== */
.dialog-name .badge-premium { margin-left: 6px; }

.msg {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
    word-wrap: break-word;
}

.msg-date { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }

.message-form {
    padding: 10px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

/* ==== Профиль ==== */
.profile-info { flex: 1; min-width: 0; }
.profile-id { color: var(--muted); font-size: 13px; }
.profile-bio { margin: 8px 0; font-size: 14px; color: #374151; }

.profile-stats {
    font-size: 13px;
    margin: 0px;
    color: #2747a9;
}

/* ==== Табы ЛК ==== */
.account-tabs {
    margin-bottom: 20px;
    overflow-x: auto;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.account-tabs ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
}
.account-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.5s;
}
.account-tab.is-active { color: #3a6bff; }
.account-tab:hover { color: #3a6bff; text-decoration: none; }

/* ==== Карточка черновика ==== */
.draft-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
}
.draft-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.draft-date { color: var(--muted); font-size: 12px; }
.draft-title { margin: 6px 0 8px; font-size: 17px; }
.draft-excerpt { color: #374151; font-size: 14px; margin: 0 0 8px; }
.draft-readmore { font-size: 13px; }
.draft-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    justify-content: flex-end;
}
.inline-form { display: inline; }

/* ==== Аватар: превью + загрузка ==== */
.avatar-row { display: flex; gap: 16px; align-items: center; }

.avatar-upload input[type="file"] { font-size: 13px; }

/* ==== Тумблеры уведомлений ==== */
.switch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 22px;
    cursor: pointer;
    transition: all 0.5s;
}
.switch-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.5s;
}

.switch input:checked + .switch-slider { background: #3a6bff; }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* ==== Заблокированные ==== */
.blocked-list { list-style: none; margin: 0; padding: 0; }
.blocked-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
}

/* ==== Вспомогательные ==== */
.page-title { margin: 0 0 16px; font-size: 20px; text-align: center; }
.empty-state {
    color: var(--muted);
    padding: 20px 0;
    text-align: center;
    margin: 0;
}
.search-form { display: flex; gap: 8px; margin-bottom: 16px; }
.search-form input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--fg);
    font-size: 14px;
}
.search-info { color: var(--muted); font-size: 13px; }
.preview-banner {
    background: #fef3c7;
    color: #92400e;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    font-size: 14px;
    border: 1px solid #ffd7b6;
}
.ad-block {
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 14px;
}
.user-id { color: var(--muted); font-size: 13px; }

/* ==== Footer ==== */
.site-footer {
    text-align: center;
    color: #5f74a6;
    padding: 24px 16px;
    font-size: 14px;
    border-top: 1px solid var(--border);
    background: #e8efff;
}
.site-footer p { margin: 0; }

.header-main {
    width: 1200px;
	height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 auto;
}

.icon-btn .fav-count {
    display: inline-block;
    margin-left: 4px;
    font-size: 12px;
    vertical-align: middle;
    min-width: 10px;
}
.icon-btn.is-active .fav-count {
    color: #3a6bff;
}

.icon-btn .comment-count {
    display: inline-block;
    margin-left: 4px;
    font-size: 12px;
    min-width: 10px;
}

.reaction-btn-add {
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.reaction-plus {
    line-height: 1;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reactions-panel {
    margin-top: 8px;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: inline-block;
}

.reactions-panel-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.reaction-panel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #e5e7eb;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.5s;
    padding: 0;
}
.reaction-panel-btn:hover {
    border-color: #e8edfd;
    background: #e8edfd;
}
.reaction-panel-btn.is-active {
    border-color: #e8edfd;
    background: #e8edfd;
}

.reaction-emoji {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.comment-reply-form {
    margin: 8px 0 8px 0px;
    padding: 8px;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.comment-reply-form textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    background: #fff;
    color: var(--fg);
}
.comment-reply-actions {
    margin-top: 6px;
    display: flex;
    gap: 8px;
    justify-content: end;
}

.my-post-wrap {
    margin-bottom: 14px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.05);
}
.my-post-wrap .post-card {
    margin-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.my-post-actions {
    display: flex;
    gap: 4px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-top: none;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    justify-content: flex-end;
}

.str-left { padding: 1px 6px 0px 0px; }
.str-right { padding: 1px 0px 0px 6px }
.hl { margin-right: auto; height: 28px; }
.vhod { width: 128px; }
.btn-user { width: 124px; }
.bell-font { font-size: 18px; }
.fa-font { font-size: 28px; }

.side-line {
    width: 100%;
    height: 1px;
    background: #e5e7eb;
    margin-top: 20px;
}

.bmess {
    position: absolute !important;
    top: -15px !important;
    right: -8px !important;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3a6bff !important;
    background: none !important;
    padding-bottom: 2px !important;
}

.bnotif {
    position: absolute !important;
    top: -10px !important;
    right: -5px !important;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3a6bff !important;
    background: none !important;
    padding-right: 8px !important;
}

.vhod-uspeh {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: 120px;
}

.preview-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.side-cats .cat-icon {
    display: block;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    opacity: 0.85;
    transition: all 0.5s;
}
.side-cats a:hover .cat-icon {
    opacity: 1;
}
.side-cats .cat-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.side-cats .cat-count {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    flex-shrink: 0;
}

.cat-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.icon-info-1 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    font-size: 20px;
    line-height: 1;
    user-select: none;
    background: #fff;
}

.icon-info-1::before {
    content: "i";
}

.icon-info-2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    font-size: 20px;
    line-height: 1;
    user-select: none;
    background: #fff;
}

.icon-info-2::before {
    content: "!";
}

.icon-info-3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    font-size: 20px;
    line-height: 1;
    user-select: none;
    background: #fff;
}

/* ============================================================
   Визуальный редактор постов
   ============================================================ */
.editor-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    overflow: hidden;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    border-bottom: 1px solid #e7ecff;
    background: #f0f4ff;
}

.editor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    color: var(--fg);
    font-size: 14px;
    transition: all 0.5s;
    padding: 0;
}
.editor-btn:hover {
	background: #d9e2ff;
	border-color: #b9c4ff;
	color: #3a6bff;
}
.editor-btn.is-active {
    background: #d9e2ff !important;
    border-color: #b9c4ff !important;
    color: #3a6bff;
}

.editor-content {
    min-height: 320px;
    max-height: 600px;
    overflow-y: auto;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--fg);
    outline: none;
    word-wrap: break-word;
    min-width: 100%;
}

.editor-content:empty::before {
    content: attr(data-placeholder);
    color: var(--muted);
    pointer-events: none;
}

.editor-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 8px 0;
    border-radius: var(--radius-sm);
}

.editor-content blockquote {
    margin: 8px 0;
    padding: 6px 12px;
    border-left: 3px solid #3a6bff;
    background: #f7f9fb;
    color: var(--muted);
}

.editor-content pre {
    margin: 8px 0;
    padding: 10px 12px;
    background: #1f2937;
    color: #e5e7eb;
    border-radius: var(--radius-sm);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow: visible;
}

.editor-upload-status {
    font-size: 12px;
    color: var(--muted);
    margin-left: 6px;
}

.post-full-content blockquote {
    position: relative;
    margin: 10px 0px 4px 0px;
    padding: 0.5em 1.0em 0.7em 2.4em;
    background: #f7f7f8;
    border-left: 4px solid #c0c0c0;
    border-radius: 6px;
    color: #444;
    font-style: italic;
    font-size: 15px;
    line-height: 1.6;
}

.post-full-content blockquote::before {
    content: "\201C";
    position: absolute;
    top: 0.05em;
    left: 0.2em;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3em;
    line-height: 1;
    color: #7e7e7e;
    font-style: normal;
    pointer-events: none;
    user-select: none;
}

.post-full-content blockquote > :first-child {
    margin-top: 0;
}

.post-full-content blockquote > :last-child {
    margin-bottom: 0;
}

.post-full-content blockquote p {
    margin: 0 0 0.6em;
}

.post-full-content blockquote pre,
.post-full-content blockquote code {
    font-style: normal;
}

.post-full-content pre {
    margin: 1em 0;
    padding: 0.5em 1em;
    background: #f9f9f9;
    color: #555;
    border-radius: 4px;
    border-top: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    border-left: 4px solid #e0e0e0;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow: visible;
}

.post-full-content code {
    padding: 0.1em 0.3em;
    background: #f4f4f4;
    border-radius: 3px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
}

.code-block {
    position: relative;
    margin: 1em 0;
}

.code-block pre {
    margin: 1em 0;
    padding: 0.5em 1em;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: visible;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: #f9f9f9;
    color: #555;
}

.code-block .js-code-copy {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    transition: all 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.code-block .js-code-copy:hover {
    background: #fff;
    color: #3a6bff;
}

.code-block .js-code-copy.is-copied {
    color: #3a6bff;
    transition: all 0.5s;
}

.post-full-content figure.post-image {
    margin: 1.0em 0;
    display: block;
}

.post-full-content figure.post-image img {
    display: inline-block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
	cursor: zoom-in;
}

.post-full-content figure.post-image[data-align="center"],
.post-full-content figure.post-image[style*="text-align:center"] {
    text-align: center;
}

.post-full-content figure.post-image[data-align="left"],
.post-full-content figure.post-image[style*="text-align:left"] {
    text-align: left;
}

.post-full-content figure.post-image[data-align="right"],
.post-full-content figure.post-image[style*="text-align:right"] {
    text-align: right;
}

.editor-imgbar {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    padding: 4px;
    margin-top: 1px;
    background: #f0f4ff;
    border-top: 1px solid #e7ecff;
    border-bottom: 1px solid #e7ecff;
}

.editor-imgbar-label {
    color: #666;
    margin-right: 4px;
	margin-left: 4px;
}

.editor-imgbar .editor-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
}

.editor-imgbar .editor-btn:hover {
	background: #d9e2ff;
	border-color: #b9c4ff;
	color: #3a6bff;
}

.but-edit-photo {
    font-size: 10px;
    min-width: 36px;
}

.drafts-but {
    background: #fff;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 6px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ============================================================
   Fullscreen-редактор
   ============================================================ */

/* Сам контейнер в fullscreen — fixed-оверлей на весь экран */
.editor-wrap.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border-radius: 0;
}

/* Тулбар — фиксированной высоты, не сжимается */
.editor-wrap.is-fullscreen .editor-toolbar {
    position: static;
    flex-shrink: 0;
    z-index: auto;
    border-radius: 0;
    border-bottom: 1px solid #e7ecff;
}

/* Панели imgbar и tablebar — не сжимаются, всегда под тулбаром */
.editor-wrap.is-fullscreen .editor-imgbar,
.editor-wrap.is-fullscreen .editor-tablebar {
    position: static;
    flex-shrink: 0;
    z-index: auto;
    background: #f0f4ff;
    border-radius: 0;
}

.editor-wrap.is-fullscreen .editor-content {
	flex: 1 1 auto;
	min-height: 0;
	max-height: none;
	overflow-y: auto;
	margin: 0px auto;
	max-width: 900px;
	width: 100%;
	min-width: 0;
	background: #fafbff;
	border-left: 1px solid #e7ecff;
	border-right: 1px solid #e7ecff;
}

/* Кнопка fullscreen в активном состоянии */
#editorFullscreen.is-active {
    background: #eef2ff;
    border-color: #b9c4ff;
    color: #3b5bdb;
}

/* Блокируем скролл body, пока открыт fullscreen */
body.editor-fullscreen-active {
    overflow: hidden;
}

/* Модалки редактора — поверх fullscreen-оверлея (z-index 9999) */
#htmlEditModal,
#tableInsertModal {
    z-index: 10000;
}

.auth-warning {
    margin: 8px 0 16px;
    padding: 10px 14px;
    background: #fff8e1;
    border-left: 4px solid #f0b400;
    border-right: 4px solid #f0b400;
    color: #6a4b00;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.category-description {
    text-align: justify;
    margin: 0px 0px 20px 0px;
}

.btn-mess-ok {
    margin-top: auto;
}

.notif-icon-kolokol {
    width: 24px;
    height: 24px;
    margin-top: 4px;
}

.header-icon-envelope {
    width: 24px;
    height: 24px;
}

.menu-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.menu-icon-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 16px;
    margin-right: 2px;
}

/* ============================================================
   Страница «Мои подписки»
   ============================================================ */
.subs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.5s;
}

.subs-item:hover {
    border-color: #d4dcf5;
}

.subs-avatar {
    flex-shrink: 0;
    display: inline-flex;
    text-decoration: none;
}

.subs-info {
    flex: 1;
    min-width: 0;
}

.subs-name {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: var(--fg);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.subs-name:hover { color: #3a6bff; text-decoration: none; }

.subs-id {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.subs-actions {
    flex-shrink: 0;
}

.profile-stat-link {
    color: inherit;
    text-decoration: none;
    transition: all 0.5s;
    margin-right: 5px;
}

.profile-stat-link:hover {
    color: #3a6bff;
    text-decoration: none;
}

.btn-sub {
    color: #fff !important;
    border-radius: 6px;
    padding: 4px 10px;
    width: 144px;
    display: flex;
    align-items: center;
    justify-content: center;
	height: 28px;
}

.btn-sub-backg {background: #5e86ff;}

.btn-sub.is-active {
    background: #3a6bff;
    color: #fff000 !important;
}

.btn-sub-otstup {
    margin-left: 2px;
}

/* ==== Кошелёк ==== */

.user-menu-balance {
    display: block;
    font-size: 12px;
    color: #2747a9;
    margin-top: 2px;
    font-weight: 600;
}

.wallet-balance {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.wallet-balance-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 4px;
}

.wallet-balance-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #2747a9;
}

.wallet-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.wallet-table th,
.wallet-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    text-align: left;
}

.wallet-table th {
    background: #f9fafb;
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
}

.wallet-table tr:last-child td {
    border-bottom: none;
}

.wallet-tx-amount.is-credit {
    color: #16a34a;
    font-weight: 600;
}

.wallet-tx-amount.is-debit {
    color: #c0392b;
    font-weight: 600;
}

.wallet-tx-comment {
    font-size: 12px;
    color: var(--muted);
}

.wallet-tx-admin {
    font-size: 12px;
    color: var(--muted);
    font-style: italic;
}

.fonts-time {
    font-size: 13px !important;
}

/* ==== Донаты ==== */
.post-donations {
    margin-top: 4px;
}

.post-donations-head {
    font-size: 14px;
    cursor: pointer;
    color: #b88a00;
    padding-bottom: 3px;
}

.post-donations-head i {
    color: #b88a00;
    margin-right: 4px;
}

.post-donations-list {
    list-style: none;
    margin: 0px;
    padding: 0;
    font-size: 14px;
}

.post-donation-item {
    padding: 2px 0;
    color: #b88a00;
}

.post-donation-item:first-child {
    border-top: none;
}

.donation-amount {
    color: #b58a00;
}

.donation-comment {
    font-style: italic;
}

.donate-balance-hint {
    text-align: center;
    font-size: 14px;
    margin-bottom: 12px;
}

.donate-sum-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

.donate-sums {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.donate-sum-btn {
    flex: 1;
    padding: 8px 4px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.5s;
    font-family: inherit;
}

.donate-sum-btn:hover {
    border-color: #3a6bff;
    color: #3a6bff;
}

.donate-amount-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    margin-bottom: 12px;
    -moz-appearance: textfield;
    appearance: textfield;
}

.donate-comment-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 4px;
}

.donate-optional {
    color: #a0a0a0;
    font-weight: 500;
}

.donate-msg {
    min-height: 20px;
    font-size: 13px;
    text-align: center;
}

.donate-msg.is-error {
    color: var(--danger);
}

.donate-msg.is-success {
    color: var(--ok);
}

.spasibo-post {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: var(--fg);
}

.donate-marleft {
    margin-left: 4px;
}

/* ==== Страница донатов ==== */
.donations-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.donations-summary-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.donations-summary-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 4px;
}

.donations-summary-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 2px;
}

.donations-summary-value.is-credit { color: #16a34a; }
.donations-summary-value.is-debit  { color: #c0392b; }

.donations-summary-count {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.donations-tabs {
    margin-bottom: 20px;
    overflow-x: auto;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.donations-tab {
    background: #5e86ff;
    color: #fff !important;
    border-radius: 6px;
    padding: 4px 10px;
    width: 144px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.donations-tab:hover {
    color: #3a6bff;
    text-decoration: none;
}

.donations-tab.is-active {
    background: #3a6bff;
    color: #fff000 !important;
}

.donations-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================================================
   Карточка доната — 3 колонки: [аватар] [инфо] [сумма]
   ============================================================ */
.donation-card {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    column-gap: 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    transition: border-color .3s;
}
.donation-card:hover       { border-color: #d4dcf5; }
.donation-card.is-refunded { opacity: .6; }

.donation-card-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
}
.donation-avatar-link { display: inline-flex; text-decoration: none; }

.donation-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.donation-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.donation-card-name a { color: var(--fg); text-decoration: none; }
.donation-card-name a:hover { color: #3a6bff; }

.donation-card-body {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.donation-card-body a { color: #2747a9; text-decoration: none; }
.donation-card-body a:hover { color: #3a6bff; }

.donation-card-comment {
    font-size: 13px;
    color: var(--muted);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.donation-card-date { font-size: 12px; color: var(--muted); }

.donation-card-sum {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
}
.donation-card-amount           { font-size: 16px; font-weight: 700; }
.donation-card-amount.is-credit { color: #16a34a; }
.donation-card-amount.is-debit  { color: #c0392b; }

.donation-badge-refund {
    display: inline-block;
    align-self: flex-start;
    color: #c0392b;
    font-weight: 600;
    font-size: 12px;
    padding: 1px 8px;
    background: #fee2e2;
    border-radius: 10px;
    margin-top: 2px;
}

/* ============================================================
   Карточка подарка — 3 колонки: [иконка] [инфо] [направление]
   ============================================================ */
.gift-card-row {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    column-gap: 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    transition: border-color .3s;
}
.gift-card-row:hover { border-color: #d4dcf5; }

.gift-card-row-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}
.gift-card-row-icon img.gift-row-icon,
.gift-card-row-icon span.gift-row-icon {
    display: block;
    width: 60px;
    height: 60px;
    object-fit: contain;
    font-size: 34px;
    line-height: 1;
    text-align: center;
    margin: 0;
}

.gift-card-row-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.gift-card-row-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gift-card-row-name a { color: var(--fg); text-decoration: none; }
.gift-card-row-name a:hover { color: #3a6bff; }

.gift-card-row-gift { font-size: 13px; color: var(--muted); }
.gift-card-row-gift b { color: var(--fg); }

.gift-card-row-message {
    font-size: 13px;
    color: var(--muted);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gift-card-row-date { font-size: 12px; color: var(--muted); }

.gift-card-row-direction {
    display: flex;
    justify-content: flex-end;
}

.gift-direction {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}
.gift-direction.is-received {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #b8dac4;
}
.gift-direction.is-sent {
    background: #e3efff;
    color: #1667d9;
    border: 1px solid #b8d4ff;
}

.gift-card-row.rarity-rare      { border-left: 4px solid #7fb2ff; }
.gift-card-row.rarity-epic      { border-left: 4px solid #b48cff; }
.gift-card-row.rarity-legendary { border-left: 4px solid #f0b400; }

/* ============================================================
   Эксклюзивный подарок на вкладке «Мои подарки»
   ============================================================ */
.gift-card-row.is-exclusive {
    background: linear-gradient(70deg, #fff 0%, #ffdede 100%);
    border-color: #ffc3c3;
}

/* Редкости внутри эксклюзива — оставляем цветные полоски слева */
.gift-card-row.is-exclusive.rarity-common    {border-left: 4px solid #f00;}

/* ============================================================
   Модалка подарков
   ============================================================ */

.gift-modal {
    max-width: 720px;
    width: 100%;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: none;
    box-shadow: 0 20px 60px rgba(20, 30, 70, 0.25);
    border-radius: 14px;
}

.gift-modal-head {
    padding: 22px 24px 16px;
    text-align: center;
    background: linear-gradient(135deg, #eef3ff 0%, #f6f2ff 100%);
    border-bottom: 1px solid #e8ecf7;
}

.gift-modal-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    color: #3a6bff;
    font-size: 24px;
    margin-bottom: 10px;
    border: 1px solid #d8e2ff;
}

.gift-modal .modal-title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
}

.gift-modal-subtitle {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    text-align: center;
}

.gift-modal-subtitle b {
    color: #3a6bff;
    font-weight: 600;
}

.gift-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 20px 24px;
    max-height: 50vh;
    overflow-y: auto;
}

.gift-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px 12px;
    background: #fff;
    border: 1.5px solid #e8ecf7;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.5s;
    overflow: hidden;
    justify-content: center;
    min-width: 0;
}

.gift-card:hover:not(:disabled) {
    border-color: #b9c4ff;
    box-shadow: 0 8px 20px rgba(58, 107, 255, 0.12);
}

.gift-card.is-selected {
    border-color: #3a6bff;
    background: #f4f7ff;
    box-shadow: 0 8px 24px rgba(58, 107, 255, 0.22);
}

.gift-card:disabled,
.gift-card.is-sold-out {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.gift-rarity-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 10px;
    border-radius: 8px;
    margin-top: 4px;
    line-height: 1.5;
    white-space: nowrap;
}

.gift-empty-state {
    padding: 40px 24px;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid #e8ecf7;
}

.gift-empty-state i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 12px;
    display: block;
}

.gift-empty-state p {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--fg);
}

.gift-empty-state .gift-empty-hint {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
}

.gift-card.rarity-common .gift-rarity-label {
    background: #eef2f7;
    color: #4b5563;
    border: 1px solid #ced6e1;
}
.gift-card.rarity-rare .gift-rarity-label {
    background: #e3efff;
    color: #1667d9;
    border: 1px solid #b8d4ff;
}
.gift-card.rarity-epic .gift-rarity-label {
    background: #efe6ff;
    color: #7c3aed;
    border: 1px solid #d4bcff;
}
.gift-card.rarity-legendary .gift-rarity-label {
    background: #fff3cc;
    color: #b88600;
    border: 1px solid #f0d478;
}

.gift-icon-big {
    font-size: 80px;
    line-height: 1;
    display: block;
    margin: 0 auto 8px;
    user-select: none;
    max-width: 100%;
}

.gift-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
}

.gift-price {
    font-size: 13px;
    color: #3a6bff;
    font-weight: 700;
    padding: 3px 12px;
    background: #d4e1ff;
    border-radius: 12px;
    margin-top: 4px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.gift-limit {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: rgba(58, 107, 255, 0.85);
    padding: 2px 6px;
    border-radius: 8px;
}

.gift-card.rarity-common {
    /* базовый вид */
}

.gift-card.rarity-rare {
    border-color: #7fb2ff;
    background: linear-gradient(180deg, #d9eaff 0%, #fff 100%);
}

.gift-card.rarity-rare .gift-price {
    color: #fff;
    background: #006dff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.gift-card.rarity-epic {
    border-color: #b48cff;
    background: linear-gradient(180deg, #ede2ff 0%, #fff 100%);
}

.gift-card.rarity-epic .gift-price {
    color: #fff;
    background: #8b49ff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.gift-card.rarity-legendary {
    border-color: #f0b400;
    background: linear-gradient(180deg, #fff5d1 0%, #fff 100%);
}

.gift-card.rarity-legendary .gift-price {
    color: #fff;
    background: #eeb600;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.gift-selected {
    margin: 0 24px 4px;
    padding: 14px 16px;
    background: #f4f7ff;
    border-radius: 10px;
    border: 1px solid #d6e0ff;
}

.gift-selected-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gift-selected-icon {
    font-size: 30px;
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.gift-selected-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.gift-selected-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gift-selected-name {
    font-weight: 600;
    font-size: 15px;
    color: #1f2937;
}

.gift-selected-price {
    font-size: 13px;
    color: #3a6bff;
    font-weight: 600;
}

.gift-selected-hint {
    margin: 10px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.gift-selected-hint b {
    color: #2747a9;
    font-weight: 600;
}

.gift-selected-wallet-hint {
    margin: 8px 0 0;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 310px;
}

.gift-selected-wallet-hint b {
    color: #065f46;
    font-size: 14px;
    font-weight: 700;
    margin-left: -4px;
    margin-right: -4px;
}

.js-gift-form {
    padding: 16px 24px 20px;
    border-top: 1px solid #e8ecf7;
    margin-top: 12px;
    background: #fafbff;
}

.js-gift-form .checkbox {
    margin-bottom: 10px;
    font-size: 14px;
}

.js-gift-form input[type="text"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    margin-bottom: 10px;
}

.js-gift-form input[type="text"]:focus {
    outline: none;
}

.gift-msg {
    min-height: 20px;
    margin: 6px 0px 16px 0px;
    font-size: 13px;
    text-align: center;
}

.gift-msg.is-error {
    color: #c0392b;
}

.gift-msg.is-success {
    color: #16a34a;
}

.gift-modal .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 6px;
}

.gift-modal .modal-actions .btn {
    min-width: 130px;
}

.notif-gift-icon {
    display: inline-block;
    vertical-align: -3px;
    width: 16px;
    height: 16px;
    margin: 0 2px;
}

img.gift-icon-big {
    display: block;
    margin: 0 auto 8px;
    object-fit: contain;
    width: 100px;
    height: 100px;
    max-width: 100%;
}

img.gift-big-icon {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ===== Подарки в профиле ===== */
.profile-gifts {
    display: flex;
    flex-wrap: wrap;
    overflow: visible;
    padding-left: 42px;
    padding-bottom: 20px;
    margin-left: -15px;
    margin-right: -15px;
	margin-bottom: -15px;
}

/* Когда есть кнопка «Показать все» — убираем нижний отступ,
   чтобы кнопка прилегала к карточкам */
.profile-gifts.has-toggle {
    padding-bottom: 0;
}

.profile-gifts.has-toggle:not(.is-expanded) {
    margin-bottom: -18px;
}

.profile-gift-badge {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 12px 8px;
    min-width: 128px;
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
	height: 200px;
    margin: 15px;
}

.profile-gift-badge:hover {
    border-color: #b9c4ff;
    box-shadow: 0 6px 16px rgba(58, 107, 255, 0.12);
}

img.gift-icon {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: contain;
    transition: all 0.5s;
    transform-origin: center;
	position: relative;
    z-index: 10; 
}

.profile-gift-badge:hover img.gift-icon,
.profile-gift-badge:active img.gift-icon {
    transform: scale(2.5);
}

.profile-gift-badge-name {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
    color: #fff;
}

.profile-gift-badge-price {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1.2;
    margin-top: 2px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.profile-gift-badge-rarity {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 1px 8px;
    border-radius: 8px;
    margin-top: 4px;
    line-height: 1.5;
    white-space: nowrap;
}

.profile-gift-badge.rarity-common    .profile-gift-badge-rarity {
    background: #eef2f7;
    color: #4b5563;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    margin: 15px 0px 10px 0px;
}
.profile-gift-badge.rarity-rare      .profile-gift-badge-rarity {
    background: #e3efff;
    color: #1667d9;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    margin: 15px 0px 10px 0px;
}
.profile-gift-badge.rarity-epic      .profile-gift-badge-rarity {
    background: #efe6ff;
    color: #7c3aed;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    margin: 15px 0px 10px 0px;
}
.profile-gift-badge.rarity-legendary .profile-gift-badge-rarity {
    background: #fff3cc;
    color: #b88600;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    margin: 15px 0px 10px 0px;
}

.profile-gift-badge-count {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: rgba(58, 107, 255, 0.85);
    padding: 1px 6px;
    border-radius: 8px;
    line-height: 1.4;
}

.profile-gift-badge.rarity-common {
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.3);
    background: linear-gradient(10deg, #88a6ff, #dcecff);
    border: 2px solid #fff;
}

.profile-gift-badge.rarity-rare {
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.3);
    background: linear-gradient(#f00, #0004ff);
    border: 2px solid #fff;
}

.profile-gift-badge.rarity-epic {
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.3);
    background: linear-gradient(#fffa00, #a300ff);
    border: 2px solid #fff;
}

.profile-gift-badge.rarity-legendary {
    background: linear-gradient(#0093ff, #f00);
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
}

body.modal-open {
    overflow: hidden;
}

.profile-gift-badge-qty {
    display: inline-block;
    margin-left: 2px;
    font-size: 14px;
    font-weight: 700;
    vertical-align: middle;
    margin-top: -4px;
}

/* ============================================================
   Premium
   ============================================================ */
.premium-status {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 16px;
}
.premium-status--active {
    border-color: #f0b400;
    box-shadow: 0 0 0 3px rgba(240, 180, 0, 0.15);
}
.premium-status-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.premium-status-label {
    font-size: 14px;
    color: #1ba000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.premium-status-limits {
    margin: 10px 0px 2px 0px;
    font-size: 14px;
    color: var(--fg);
    height: 26px;
}

.premium-status-until {
    margin: 10px 0px 2px 0px;
    font-size: 14px;
    color: var(--fg);
}

.premium-balance {
    text-align: center;
    font-size: 14px;
    color: #2747a9;
    margin-bottom: 16px;
}

.badge-premium {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: #3a6bff;
    padding: 0px 4px;
    border-radius: 10px;
    line-height: 1.6;
    margin-top: 3px;
}

.premium-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.premium-plan {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
}

.premium-plan-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.premium-plan-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--fg);
}

.premium-plan-price {
    font-size: 22px;
    font-weight: 700;
    color: #3a6bff;
}

.premium-plan-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: var(--fg);
    flex: 1;
}

.premium-plan-features li::before {
    content: "✓";
    color: #16a34a;
    font-weight: 700;
    margin-right: 8px;
}

.premium-plan .btn {
    width: 100%;
}

.premium-plan .btn:disabled {
    background: #cbd5e1;
    border-color: #cbd5e1;
    cursor: not-allowed;
}

.premium-hint {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin-top: 20px;
}

.notif-avatar-system {
    background: linear-gradient(135deg, #ffd166 0%, #f0b400 100%);
    color: #4a3200;
}
.notif-avatar-system i {
    font-size: 14px;
    line-height: 1;
}

.notif-avatar-wallet {
    background: linear-gradient(135deg, #ffeed4 0%, #ff9700 100%);
    color: #fff;
}
.notif-avatar-wallet i {
    font-size: 14px;
    line-height: 1;
}

.gift-price-old {
    display: inline-block;
    font-size: 11px;
    text-decoration: line-through;
    margin-right: 4px;
    font-weight: 500;
}
.gift-price-new {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
}

.premium-locked {
    background: #fff;
    border: 1px dashed #f0b400;
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.premium-locked-title {
    font-size: 18px;
    font-weight: 700;
    color: #b88600;
    margin: 0;
}
.premium-locked-title i {
    color: #f0b400;
    margin-right: 6px;
}
.premium-locked-text {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 6px;
    max-width: 480px;
}

/* ============================================================
   Настройки: заглушка «Реквизиты для донатов — только Premium»
   ============================================================ */
.donate-requisites-locked {
    text-align: center;
}

.donate-requisites-locked-text {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #b88600;
}

.donate-requisites-locked-text i {
    color: #f0b400;
    margin-right: 6px;
}

.donate-requisites-locked .auth-hint {
    margin: 0 0 16px;
}

.donate-requisites-locked .form-actions {
    margin-top: 0;
}

.profile-stat-locked {
    color: inherit;
    cursor: help;
}
.profile-lock-icon {
    color: #f0b400;
    font-size: 12px;
    margin-left: 4px;
    vertical-align: middle;
}

.post-card--highlight {
    border: 2px solid #f0b400;
}
.post-card--highlight:hover {
    border-color: #e0a800;
}

.post-mark {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 1px 8px;
    border-radius: 9px;
    vertical-align: middle;
    margin-left: 8px;
    line-height: 1.6;
    white-space: nowrap;
}

.post-mark--highlight {
    color: #fff;
    background: #f0b400;
    text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.post-mark--boost {
    color: #fff;
    background: #3a6bff;
    text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.post-card--boosted:not(.post-card--highlight) {
    border-left: 3px solid #3a6bff;
}

.my-post-actions .js-boost:disabled,
.my-post-actions .js-highlight:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.my-post-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 10px 16px;
    background: #f9fafb;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 12px;
}

.my-post-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0 6px;
    border-right: 1px solid var(--border);
}
.my-post-stat:last-child {
    border-right: none;
}

.my-post-stat-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 10px;
    font-weight: 600;
}

.my-post-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #2747a9;
    line-height: 1.1;
}

.premium-locked--compact {
    padding: 16px 18px;
    margin-bottom: 14px;
}
.premium-locked--compact .premium-locked-title {
    font-size: 15px;
}
.premium-locked--compact .premium-locked-text {
    font-size: 13px;
    margin-bottom: 4px;
}
.premium-locked--compact .btn {
    font-size: 13px;
    padding: 6px 14px;
}

.checkbox--locked {
    color: var(--muted);
    cursor: not-allowed;
    opacity: 0.7;
}
.checkbox--locked input[type="checkbox"] {
    cursor: not-allowed;
}
.checkbox--locked a {
    color: #3a6bff;
    font-weight: 600;
}

.avatar-upload-locked-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}
.avatar-upload-locked-label i {
    color: #f0b400;
    margin-right: 4px;
}

.btn-locked {
    opacity: 1.0;
}

.btn-locked i {
    color: #f0b400;
    margin-right: 4px;
    margin-top: 2px;
}

.profile-name .badge-premium {
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 10px;
    margin-top: 4px;
}

.profile-avatar {
    border-radius: 50%;
    padding: 3px;
    background: #9bb4ff;
}

.profile-avatar--premium {
    border-radius: 50%;
    padding: 3px;
    background: #9bb4ff;
}

.profile-avatar--premium .avatar-big {
    border: 3px solid #fff;
    border-radius: 50%;
}

.profile-name {
    margin: 0; font-size: 22px;
}

.profile-name--premium {
    margin: 0;
    font-size: 20px;
    color: #2747a9;
	display: flex;
	align-items: center;
}

.subs-name .badge-premium {
    margin-left: 5px;
    position: relative;
    top: -1px;
}

.premium-ad {
    position: relative;
    background: linear-gradient(160deg, #fff8e3 0%, #fdf2c4 100%);
    border: 1px solid #f0d478;
    border-radius: var(--radius);
    padding: 20px 16px 16px;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(240, 180, 0, 0.12);
    margin-bottom: 14px;
}

.premium-ad-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd166 0%, #f0b400 100%);
    color: #4a3200;
    font-size: 22px;
    margin: 0 auto 10px;
    box-shadow: 0 6px 16px rgba(240, 180, 0, 0.35);
}

.premium-ad-body {
    margin-bottom: 12px;
}

.premium-ad-title {
    font-size: 18px;
    font-weight: 800;
    color: #8a5a00;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.premium-ad-sub {
    font-size: 12px;
    color: #a17b1c;
    margin-top: 2px;
}

.premium-ad-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #6a4b00;
}

.premium-ad-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.premium-ad-list i {
    color: #16a34a;
    font-size: 12px;
    flex-shrink: 0;
}

.premium-ad-btn {
    display: block;
    padding: 10px 14px;
    background: #f0b400;
    color: #fff !important;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.premium-ad-btn:hover {
    background: #ffc30e;
}

.premium-ad--active {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-align: left;
    background: linear-gradient(160deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #86efac;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.12);
}

.premium-ad--active .premium-ad-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
    margin: 0;
    background: linear-gradient(135deg, #86efac 0%, #16a34a 100%);
    color: #052e16;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.premium-ad--active .premium-ad-body {
    margin-bottom: 0;
}

.premium-ad--active .premium-ad-title {
    color: #065f46;
    font-size: 14px;
}

.premium-ad--active .premium-ad-sub {
    color: #15803d;
    font-size: 12px;
    margin-top: 2px;
}

.sidebar-widget {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.03);
}

.sidebar-widget-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--muted);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.sidebar-widget-head i {
    color: #3a6bff;
    font-size: 14px;
}

.progress-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.progress-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    background: #f7f9fb;
    border-radius: 8px;
    text-decoration: none;
    color: var(--fg);
    width: 88px;
}

.progress-cell:hover {
    background: #ecf6ff;
}

.progress-value {
    font-size: 20px;
    font-weight: 800;
    color: #2747a9;
    line-height: 1.1;
    transition: all 0.5s;
}
.progress-cell:hover .progress-value {
    color: #3a6bff;
}
.progress-label {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.progress-rewards {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #daa400;
    border-radius: 8px;
    padding: 0px;
    justify-content: center;
}
.progress-rewards i {
    color: #daa400;
}
.progress-rewards b {
    margin-left: -2px;
}

.progress-drafts {
    display: none;
    margin-top: 8px;
    padding: 6px 10px;
    font-size: 12px;
    color: #6a4b00;
    background: #fff8e3;
    border: 1px dashed #f0d478;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.15s;
}
.progress-drafts:hover {
    background: #fdf2c4;
    text-decoration: none;
}

.tasks-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 4px 0;
}
.task-check {
    flex-shrink: 0;
    font-size: 14px;
    color: var(--muted);
    width: 16px;
    text-align: center;
}
.task-item.is-done .task-check {
    color: #3a6bff;
}
.task-label {
    flex: 1;
    min-width: 0;
    color: var(--fg);
}
.task-item.is-done .task-label {
    color: var(--muted);
    text-decoration: line-through;
    text-decoration-color: rgba(107, 114, 128, 0.5);
}
.task-amount {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 12px;
    color: #2747a9;
    padding: 2px 6px;
    border-radius: 8px;
}
.task-item.is-done .task-amount {
    color: #9ca3af;
}

.tasks-sum {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: #2747a9;
    text-align: center;
}
.tasks-sum b {
    font-size: 13px;
}

.side-cats li.cat-hidden {
    display: none;
}

#categoriesBlock.is-expanded .side-cats li.cat-hidden {
    display: block;
}

.side-more-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 13px;
    font-family: inherit;
    color: #1f2937;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.5s;
}

.side-more-toggle:hover {
    background: #f4f7ff;
    color: #3a6bff;
    border-color: #b9c4ff;
}

.side-more-toggle i {
    font-size: 11px;
    transition: all 0.5s;
}

#categoriesBlock.is-expanded .side-more-toggle i {
    transform: rotate(180deg);
}

.deposit-create-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.deposit-quick-sums {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.deposit-quick-btn {
    flex: 1 1 auto;
    min-width: 80px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: var(--fg);
    transition: all 0.5s;
}
.deposit-quick-btn:hover {
    border-color: #3a6bff;
    color: #3a6bff;
    background: #f7faff;
}

.deposit-msg {
    min-height: 20px;
    margin-top: 10px;
    font-size: 13px;
    text-align: center;
}
.deposit-msg.is-error   { color: var(--danger); }
.deposit-msg.is-success { color: var(--ok); }

.deposit-active-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #fff8e3;
    border: 1px solid #f0d478;
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.deposit-active-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: #f0b400;
    color: #fff;
    border-radius: 50%;
    flex-shrink: 0;
}
.deposit-active-body { flex: 1; min-width: 0; }
.deposit-active-title { font-size: 14px; color: #6a4b00; }
.deposit-active-status { font-size: 12px; color: #a17b1c; margin-top: 2px; }

.deposit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.deposit-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.3s;
}
.deposit-item:hover { border-color: #d4dcf5; }
.deposit-item.is-credited { border-left: 4px solid #16a34a; }
.deposit-item.is-cancelled { border-left: 4px solid #c0392b; opacity: .7; }
.deposit-item.is-expired   { border-left: 4px solid #9ca3af; opacity: .7; }
.deposit-item.is-paid      { border-left: 4px solid #f0b400; }
.deposit-item.is-pending   { border-left: 4px solid #3a6bff; }

.deposit-item-main { min-width: 0; }
.deposit-item-code {
	display: block;
	font-weight: 600;
	color: var(--fg);
	text-decoration: none;
}
.deposit-item-code:hover { color: #3a6bff; }
.deposit-item-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}
.deposit-item-amount { font-weight: 600; color: #2747a9; }
.deposit-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.deposit-status {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	padding: 2px 6px;
	border-radius: 10px;
	white-space: nowrap;
}
.deposit-status.is-pending   { background: #e3efff; color: #1667d9; border: 1px solid #b8d4ff; }
.deposit-status.is-paid      { background: #fff3cc; color: #b88600; border: 1px solid #f0d478; }
.deposit-status.is-credited  { background: #dcfce7; color: #166534; border: 1px solid #b8dac4; }
.deposit-status.is-cancelled { background: #fee2e2; color: #991b1b; border: 1px solid #ffbcbc; }
.deposit-status.is-expired   { background: #eef2f7; color: #4b5563; border: 1px solid #ced6e1; }

.deposit-details {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 20px;
}
.deposit-details.is-credited  { border-color: #b8dac4; }
.deposit-details.is-cancelled { border-color: #ffbcbc; }
.deposit-details.is-paid      { border-color: #f0d478; background: #fffdf5; }

.deposit-details-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.deposit-details-title { font-size: 16px; color: var(--fg); }

.deposit-details-amount {
    font-size: 32px;
    font-weight: 800;
    color: #2747a9;
    text-align: center;
    margin: 12px 0 18px;
}

.deposit-details-row {
    display: flex;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 6px;
}
.deposit-details-label { color: var(--muted); min-width: 130px; }
.deposit-details-value { color: var(--fg); }

.deposit-details-warn {
    padding: 12px 14px;
    background: #fff8e3;
    border: 1px solid #f0d478;
    border-radius: 6px;
    color: #6a4b00;
    font-size: 13px;
    margin-top: 14px;
}

.deposit-details-instruction {
    margin-top: 18px;
    padding: 16px 18px;
    background: #f7f9fb;
    border-radius: var(--radius-sm);
    border-left: 3px solid #3a6bff;
    border-right: 3px solid #3a6bff;
}
.deposit-instruction-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #2747a9;
}
.deposit-instruction-title i { margin-right: 6px; }
.deposit-instruction-list {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    color: var(--fg);
    line-height: 1.6;
}
.deposit-instruction-list li { margin-bottom: 6px; }

.deposit-copy-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.deposit-order-code-big {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 16px;
    font-weight: 700;
    padding: 6px 12px;
    background: #fff;
    border: 1px dashed #3a6bff;
    border-radius: 6px;
    color: #2747a9;
    letter-spacing: 0.5px;
}

.deposit-requisites {
    margin-top: 16px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.deposit-requisites-title {
    font-weight: 700;
    font-size: 14px;
    color: #2747a9;
    margin-bottom: 10px;
}
.deposit-req-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.deposit-req-row:last-child { border-bottom: none; }
.deposit-req-label { color: var(--muted); }
.deposit-req-value b { color: var(--fg); }

.js-copy-requisite {
    margin-left: 8px;
    margin-bottom: 4px;
    padding: 2px 10px;
    font-size: 12px;
    height: auto;
    vertical-align: middle;
    background: #f4f7ff;
    color: #2747a9;
    border: 1px solid #d6e0ff;
    text-shadow: none;
}
.js-copy-requisite:hover {
    background: #e3efff;
    border-color: #b9c4ff;
    color: #3a6bff;
}
.js-copy-requisite i {
    margin-right: 4px;
    font-size: 12px;
}

.deposit-req-qr {
    text-align: center;
    margin-top: 12px;
}
.deposit-req-qr img {
    max-width: 220px;
    display: inline-block;
}

.deposit-details-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}
.deposit-details-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: #fff8e3;
    border: 1px solid #f0d478;
    border-radius: 6px;
    color: #6a4b00;
    font-size: 13px;
    margin-top: 16px;
}
.deposit-details-info i { color: #f0b400; }
.deposit-details-msg {
    min-height: 20px;
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
}
.deposit-details-msg.is-error   { color: var(--danger); }
.deposit-details-msg.is-success { color: var(--ok); }

.deposit-details-back {
    margin-top: 16px;
    text-align: center;
}

.notif-avatar-deposit {
    background: linear-gradient(135deg, #d4f3ff 0%, #3a9bff 100%);
    color: #fff;
}
.notif-avatar-deposit i {
    font-size: 14px;
    line-height: 1;
}

.wallet-balance-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.wallet-topup-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.appearance {
    border: 1px solid #e5e7eb;
    text-align: center;
    font-size: 20px;
    width: 108px;
    border-radius: 6px;
    -moz-appearance: textfield;
    appearance: textfield;
    color: var(--fg);
}

.js-copy-requisite.is-copied {
    color: #3a6bff;
    transition: all 0.5s;
}

/* ============================================================
   Сайдбар для гостей — «Присоединяйтесь» и «О проекте»
   ============================================================ */

.sidebar-cta {
    background: linear-gradient(160deg, #eef3ff 0%, #dbe6ff 100%);
    border: 1px solid #b8d4ff;
    border-radius: var(--radius);
    padding: 18px 16px;
    margin-bottom: 14px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(58, 107, 255, 0.08);
    overflow: hidden;
    position: relative;
}

.sidebar-cta-head {
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.sidebar-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5e86ff 0%, #3a6bff 100%);
    color: #fff;
    font-size: 20px;
    margin: 0 auto 10px;
}

.sidebar-cta-title {
    font-size: 17px;
    font-weight: 800;
    color: #1e3a8a;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.sidebar-cta-sub {
    font-size: 12px;
    color: #2747a9;
    margin-top: 2px;
}

.sidebar-cta-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #1f2937;
    position: relative;
    z-index: 1;
}

.sidebar-cta-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-cta-list i {
    color: #16a34a;
    font-size: 12px;
    flex-shrink: 0;
}

.sidebar-cta-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.sidebar-cta-btn {
    display: block;
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s, background-color 0.15s;
}

.sidebar-cta-btn--primary {
    background: #3a6bff;
    color: #fff !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.5s;
}

.sidebar-cta-btn--primary:hover {
    background: #5e86ff;
    border-color: #5e86ff;
}

.sidebar-cta-btn--secondary {
    background: #fff;
    color: #2747a9 !important;
    border: 1px solid #b8d4ff;
}

.sidebar-cta-btn--secondary:hover {
    background: #f4f7ff;
    text-decoration: none;
    color: #3a6bff !important;
}

.sidebar-about {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 14px;
}

.sidebar-about .sidebar-widget-head {
    margin-bottom: 10px;
}

.sidebar-about-text {
    font-size: 13px;
    line-height: 1.55;
    color: var(--fg);
    margin: 0 0 10px;
    text-align: justify;
}

.sidebar-about-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #2747a9;
    text-decoration: none;
    justify-content: center;
}

.sidebar-about-link:hover {
    color: #3a6bff;
}

.sidebar-about-link i {
    font-size: 11px;
}

.reactions-panel-premium {
    padding-top: 4px;
    flex-wrap: wrap;
}

.reaction-panel-btn.reaction-premium,
.reaction-btn.reaction-premium {
    position: relative;
}

.reaction-crystal {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    pointer-events: none;
}

.reaction-panel-btn[data-premium-locked="1"],
.reaction-btn[data-premium-locked="1"] {
    cursor: default;
}

.post-nav-row {
    height: 0;
    position: relative;
    text-align: right;
    top: 57px;
    right: 17px;
}

.post-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.5s;
    font-family: inherit;
}

.post-nav-btn:hover {
    background: #f7faff;
    border-color: #3a6bff;
    color: #3a6bff;
    text-decoration: none;
}

.post-nav-btn i {
    font-size: 12px;
}

.lenta {
    height: 30px;
    width: 70px;
    padding: 0px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

article[id^="post-"] {
    scroll-margin-top: calc(var(--header-h) + 10px);
}

.podarki-head {
    padding: 6px 0px 6px 0px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 9px;
}

.profile-gift-badge.gift-hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
    border-width: 0;
    pointer-events: none;
    transition:
        max-height 0.35s ease,
        opacity 0.25s ease,
        padding 0.35s ease,
        margin 0.35s ease,
        border-width 0.35s ease;
}

#profileGifts.is-expanded .profile-gift-badge.gift-hidden {
    max-height: 220px;
    opacity: 1;
    overflow: visible;
    padding-top: 10px;
    padding-bottom: 8px;
    margin: 15px;
    border-width: 2px;
    pointer-events: auto;
}

#profileGifts.is-expanded ~ .gifts-more-wrap .gifts-more-toggle i,
.gifts-more-toggle.is-expanded i {
    transform: rotate(180deg);
}

.gifts-more-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 13px;
    font-family: inherit;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    background: #3a6bff;
    border: 1px solid #3a6bff;
    transition: all 0.5s;
    margin-top: 0;
}

.gifts-more-toggle:hover {
    background: #5e86ff;
    border-color: #5e86ff;
    color: #fff;
}

.gifts-more-wrap {
    text-align: right;
    position: relative;
    z-index: 6;
	margin: 20px;
}

.gifts-more-toggle i {
    font-size: 11px;
    transition: transform 0.5s;
}

#profileGifts.is-expanded ~ .gifts-more-toggle i,
.gifts-more-toggle.is-expanded i {
    transform: rotate(180deg);
}

.profile-head {
    padding: 0;
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 20px;
}

.profile-head--premium {
    box-shadow: 0 0 0 3px rgba(58, 107, 255, 0.12);
}

.profile-top {
    display: flex;
    gap: 20px;
    padding: 20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    border-bottom: 4px solid #e0e7fb;
    overflow: hidden;
    background: linear-gradient(135deg, #e7ebfb, #89b7ff);
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    align-items: center;
	height: 174px;
}

.profile-top::before {
    content: "";
    position: absolute;
    inset: -10px;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
    inset: 0;
    background-image: var(--cover-url, none);
    background-size: auto;
    background-position: center center;
}

/* Профиль без «низа» (закрытый профиль для зрителя) —
   скругляем все углы и убираем нижнюю границу */
.profile-head--no-bottom .profile-top,
.profile-top--no-bottom {
    border-bottom: none;
    border-radius: 6px;
}

.profile-top--with-cover {
    color: #fff;
}

.profile-top[style*="--cover-url"]::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.0) 100%);
    pointer-events: none;
    z-index: 1;
}

.profile-top--with-cover > * {
    position: relative;
    z-index: 2;
}

.profile-top--with-cover .profile-name,
.profile-top--with-cover .profile-id,
.profile-top--with-cover .profile-bio,
.profile-top--with-cover .profile-stats,
.profile-top--with-cover .profile-stat-link {
    color: #fff;
}

.profile-top--with-cover .profile-stat-link:hover {
    color: #fff000;
}

.profile-bottom {
    /*padding: 4px 20px 20px 20px;*/
    background: #fff;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    overflow: visible;
}

.profile-top .profile-avatar {
    flex-shrink: 0;
}

.profile-top .profile-info {
    flex: 1;
    min-width: 0;
	height: 138px;
}

.profile-top--with-cover .profile-id {
    color: rgba(255, 255, 255, 0.8);
}

.profile-top--with-cover .profile-bio {
    color: rgba(255, 255, 255, 0.95);
}

.profile-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 11px;
}

.cover-row {
    margin-bottom: 20px;
}

.cover-preview-wrap {
    margin-bottom: 10px;
}

.cover-preview {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.cover-preview--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f9fb;
    color: var(--muted);
    font-size: 14px;
    aspect-ratio: 4 / 1;
}

.cover-preview--empty i {
    margin-right: 6px;
    font-size: 18px;
}

.cover-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.cover-actions .btn {
    cursor: pointer;
}

.cover-upload-locked {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

.cover-upload-locked i {
    color: #f0b400;
    margin-right: 4px;
}

.form-hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
	text-align: justify;
}

.cover-presets {
    margin-bottom: 12px;
}

.cover-presets-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

.cover-presets-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.cover-preset {
    position: relative;
    aspect-ratio: 4 / 1;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    padding: 0;
    transition: all 0.5s;
    overflow: hidden;
    border: 2px solid #000;
    height: 40px;
    width: 99px;
	box-shadow: 0 0 0 3px rgba(58, 107, 255, 0.0);
}

.cover-preset:hover {
    box-shadow: 0 0 0 3px rgba(58, 107, 255, 0.5);
}

.cover-preset.is-active {
    box-shadow: 0 0 0 3px rgba(58, 107, 255, 0.5);
}

.cover-preset:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.podnyatie {
    background: #f6f8ff;
    border-radius: 6px;
    padding: 1px 5px 4px 5px;
    border: 1px solid #d4deff;
    margin-right: 2px;
}

.vydelenie {
    background: #f6f8ff;
    border-radius: 6px;
    padding: 1px 5px 4px 5px;
    border: 1px solid #d4deff;
}

.premium-buy-modal {
    max-width: 560px;
    width: 100%;
    padding: 0px 0px 25px 0px;
    overflow: hidden;
    border-radius: 14px;
}

.premium-buy-head {
    padding: 22px 24px 16px;
    text-align: center;
    background: linear-gradient(135deg, #fff8e3 0%, #fdf2c4 100%);
    border-bottom: 1px solid #f0d478;
}

.premium-buy-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd166 0%, #f0b400 100%);
    color: #4a3200;
    font-size: 24px;
    margin-bottom: 10px;
}

.premium-buy-subtitle {
    margin: 0;
    font-size: 14px;
    color: #6a4b00;
}

.premium-buy-subtitle b {
    color: #8a5a00;
    font-weight: 700;
}

.premium-buy-body {
    padding: 20px 24px;
}

.premium-buy-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f4f7ff;
    border: 1px solid #d6e0ff;
    border-radius: 8px;
    font-size: 13px;
    color: #2747a9;
    margin: 0 0 16px;
}

.premium-buy-hint i {
    color: #3a6bff;
    flex-shrink: 0;
}

.premium-buy-summary {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.pb-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding: 4px 0;
}

.pb-summary-label {
    color: var(--muted);
}

.pb-summary-value {
    font-weight: 700;
    color: var(--fg);
}

.pb-summary-value.is-credit { color: #16a34a; }
.pb-summary-value.is-debit  { color: #c0392b; }

.pb-balance {
    text-align: center;
    font-size: 14px;
    color: #2747a9;
    margin-bottom: 16px;
}

.pb-balance b {
    font-weight: 700;
}

.pb-gifts-block {
    margin-bottom: 12px;
}

.pb-gifts-title {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.pb-gifts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
}

.pb-gift-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: linear-gradient(80deg, #d6dfff, #ffcaca);
    border: 1px solid #fd9090;
    border-radius: 10px;
    font-size: 13px;
}

.pb-gift-chip.rarity-rare      { border-color: #7fb2ff; background: #f6faff; }
.pb-gift-chip.rarity-epic      { border-color: #b48cff; background: #f7f2ff; }
.pb-gift-chip.rarity-legendary { border-color: #f0b400; background: #fff9e3; }

.pb-gift-chip-icon img {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.pb-gift-emoji {
    display: inline-block;
    font-size: 24px;
    line-height: 1;
}

.pb-gift-chip-name {
    font-weight: 600;
    color: var(--fg);
}

.pb-gift-chip-price {
    color: #2747a9;
    font-weight: 700;
    margin-left: 2px;
}

.pb-gifts-empty {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
    font-style: italic;
}

.pb-msg {
    min-height: 20px;
    margin-top: 8px;
    font-size: 13px;
    text-align: center;
}

.pb-msg.is-error   { color: var(--danger); }
.pb-msg.is-success { color: var(--ok); }

.donate-modal {
    max-width: 440px;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(20, 30, 70, 0.25);
}

.donate-head {
    padding: 22px 24px 18px;
    text-align: center;
    background: linear-gradient(135deg, #eef3ff 0%, #f6f2ff 100%);
    border-bottom: 1px solid #e8ecf7;
}

.donate-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd166 0%, #f0b400 100%);
    color: #4a3200;
    font-size: 24px;
    margin-bottom: 10px;
    border: 1px solid #e1a600;
}

.donate-head .modal-title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.donate-head-subtitle {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.donate-modal .donate-balance-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    margin: 0;
    background: #f9fafb;
    border-bottom: 1px solid #e8ecf7;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

.donate-modal .donate-balance-hint i {
    color: #3a6bff;
    font-size: 14px;
}

.donate-modal .donate-balance-hint b {
    color: #2747a9;
    font-size: 15px;
    font-weight: 700;
}

.donate-modal .modal-body {
    padding: 14px 14px 0px 14px;
    gap: 0;
    margin-bottom: 0;
}

.donate-section {
    margin-bottom: 18px;
}

.donate-modal .donate-sum-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.donate-modal .donate-sums {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.donate-modal .donate-sum-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 4px 8px;
    border: 1.5px solid #e8ecf7;
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.5s;
    font-family: inherit;
}

.donate-modal .donate-sum-btn:hover {
    border-color: #3a6bff;
    background: #f4f7ff;
}

.donate-modal .donate-sum-btn.is-active {
    border-color: #3a6bff;
    background: #3a6bff;
    color: #fff;
}

.donate-sum-value {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    transition: all 0.5s;
}

.donate-sum-cur {
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
    transition: all 0.5s;
}

.donate-modal .donate-sum-btn:hover .donate-sum-value { color: #3a6bff; }
.donate-modal .donate-sum-btn:hover .donate-sum-cur   { color: #3a6bff; }

.donate-modal .donate-sum-btn.is-active .donate-sum-value,
.donate-modal .donate-sum-btn.is-active .donate-sum-cur {
    color: #fff;
}

.donate-amount-wrap {
    position: relative;
}

.donate-modal .donate-amount-input {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border: 1.5px solid #e8ecf7;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    margin: 0;
    background: #fff;
    color: #1f2937;
    transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield;
    appearance: textfield;
}

.donate-modal .donate-amount-input::-webkit-outer-spin-button,
.donate-modal .donate-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.donate-modal .donate-amount-input:focus {
    outline: none;
    border-color: #3a6bff;
}

.donate-amount-cur {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 15px;
    font-weight: 600;
    pointer-events: none;
}

.donate-modal .donate-comment-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.donate-modal .spasibo-post {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e8ecf7;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #1f2937;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.donate-modal .spasibo-post:focus {
    outline: none;
    border-color: #3a6bff;
}

.checkbox-public {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid #e8ecf7;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.checkbox-public:hover {
    border-color: #b9c4ff;
    background: #f4f7ff;
}

.checkbox-public input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.checkbox-public-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    color: #1f2937;
    line-height: 1.4;
}

.checkbox-public-text b {
    font-weight: 600;
}

.checkbox-public-hint {
    font-size: 12px;
    color: #6b7280;
}

.donate-modal .donate-msg {
	font-size: 13px;
	text-align: center;
	margin-bottom: 4px;
}

.donate-modal .donate-msg.is-error {
    color: #c0392b;
}

.donate-modal .donate-msg.is-success {
    color: #16a34a;
}

.donate-actions {
    display: flex;
    gap: 10px;
    padding: 14px;
    margin: 0;
    justify-content: stretch;
}

.donate-actions .btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
}

.donate-submit {
    border: none;
}

.donate-submit i {
    margin-right: 6px;
}

.donate-actions .btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    text-shadow: none;
}

.donate-actions .btn-cancel:hover {
    background: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
    transform: none;
    box-shadow: none;
}

.post-author-avatar,
.profile-avatar-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.online-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-sizing: border-box;
    pointer-events: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.online-dot.is-online {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.online-dot.is-away {
    background: #9ca3af;
}

.profile-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-online {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #16a34a;
    font-weight: 500;
	margin-top: 2px;
}

.profile-online .online-dot {
    position: static;
    width: 8px;
    height: 8px;
    border: none;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
    margin-bottom: -2px;
}

.online-text.is-away {
    color: #6b7280;
    font-weight: 500;
}

/* ============================================================
   Страница сообщений — новый дизайн
   ============================================================ */

.messages-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 620px;
    max-height: 720px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.dialogs-list {
    background: #fff;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-height: 100%;
    overflow-y: auto;
}

.dialogs-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    background: #f9fafb;
}

.dialogs-count {
    margin-left: auto;
    padding: 1px 8px;
    font-size: 12px;
    color: var(--muted);
    border-radius: 10px;
    font-weight: 700;
}

.dialogs-scroll {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.dialogs-scroll::-webkit-scrollbar { width: 6px; }
.dialogs-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.dialogs-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
}
.dialogs-empty i {
    font-size: 40px;
    color: #cbd5e1;
    margin-bottom: 10px;
    display: block;
}
.dialogs-empty p {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--fg);
}
.dialogs-empty small {
    font-size: 12px;
    display: block;
}

.dialog-item {
    display: flex;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    text-decoration: none;
    color: var(--fg);
    transition: all 0.5s;
    position: relative;
}

.dialog-item:hover {
    background: #f6f9ff;
    border-bottom: 1px solid #e5e7eb;
}

.dialog-item.is-active { background: #eef4ff; }

.dialog-item.is-active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #3a6bff;
}

.dialog-link {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 14px 12px 16px;
    color: var(--fg);
    text-decoration: none;
    width: 100%;
}
.dialog-link:hover {
    text-decoration: none; color: var(--fg);
}

.dialog-avatar-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
    flex-shrink: 0;
}
.dialog-avatar-wrap .online-dot {
    width: 11px;
    height: 11px;
    border-width: 2px;
}

.dialog-info {
    flex: 1;
    min-width: 0;
}

.dialog-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-bottom: 2px;
}

.dialog-name .badge-premium {
    font-size: 9px;
    padding: 0 4px;
    vertical-align: middle;
    margin-left: 4px;
}
.dialog-last {
    display: block;
    font-size: 12px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dialog-badge {
    flex-shrink: 0;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #3a6bff;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.dialog-hide {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.5s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #abb4c5;
}

.dialog-item:hover .dialog-hide { opacity: 1; }

.dialog-hide:hover {
    color: #c0392b;
    background: #fee2e2;
    border: 1px solid #ffb5b5;
}

.dialog-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    text-align: center;
    padding: 40px 20px;
}
.dialog-empty-state i {
    font-size: 56px;
    color: #cbd5e1;
    margin-bottom: 14px;
}
.dialog-empty-state p {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--fg);
}
.dialog-empty-state small {
    font-size: 13px;
}

.dialog-head {
    padding: 7px 16px;
    border-bottom: 1px solid var(--border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dialog-head .post-author {
    gap: 10px;
    min-width: 0;
}
.dialog-head-avatar {
    position: relative;
    display: inline-block;
    line-height: 0;
    flex-shrink: 0;
}
.dialog-head-profile {
    font-size: 14px;
}
.dialog-head-profile:hover {
    color: #3a6bff;
}

.dialog-thread {
    flex: 1;
    padding: 20px 20px 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    height: 502px;
}

.dialog-thread::-webkit-scrollbar { width: 6px; }

.dialog-thread::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.dialog-thread-empty {
    text-align: center;
    color: var(--muted);
    padding: 40px 20px;
    margin: auto;
}
.dialog-thread-empty i {
    font-size: 40px;
    color: #cbd5e1;
    margin-bottom: 10px;
    display: block;
}

.msg {
    position: relative;
    max-width: 72%;
    padding: 8px 14px 6px;
    border-radius: 14px;
    font-size: 14px;
    word-wrap: break-word;
    line-height: 1.45;
    animation: msgIn 0.5s;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.msg-mine {
    align-self: flex-end;
    background: #3a6bff;
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 6px rgba(58, 107, 255, 0.2);
    border: 0;
}

.msg-mine .msg-body a { color: #fff; text-decoration: underline; }
.msg-mine .msg-date { color: rgba(255, 255, 255, 0.8); }
.msg-mine .msg-edited { color: rgba(255, 255, 255, 0.8); }

.msg-theirs {
    align-self: flex-start;
    background: #fff;
    color: var(--fg);
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.msg-body {
    font-size: 14px;
    word-wrap: break-word;
}

.msg-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 11px;
    margin-top: 3px;
    opacity: 0.85;
}

.msg-action {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s;
    margin-left: -2px;
}

.msg-action img {
    display: block;
    width: 14px;
    height: 14px;
    object-fit: contain;
    transition: all 0.5s;
    pointer-events: none;
}

.msg-mine .msg-action img {
    filter: brightness(0) invert(1);
    opacity: 0.7;
}
.msg-mine .msg-action:hover img {
    opacity: 1;
}
.msg-mine .msg-action:hover {
    background: rgba(255, 255, 255, 0.2);
}

.msg-theirs .msg-action img {
    opacity: 0.6;
}
.msg-theirs .msg-action:hover img {
    opacity: 1;
}
.msg-theirs .msg-action:hover {
    background: #f4f7ff;
}

.msg:hover .msg-action {
    opacity: 1;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.2);
}

.msg-meta .msg-action:first-of-type {
    margin-left: auto;
}

.msg-date { color: var(--muted); }
.msg-edited { color: var(--muted); font-style: italic; }

.msg-actions {
    position: absolute;
    top: calc(100% + 4px);
    display: flex;
    gap: 3px;
    opacity: 0;
    cursor: pointer;
    align-items: center;
    justify-content: end;
    transition: all 0.5s;
    right: 0px;
    width: 100%;
}

.msg-actions:hover {
    opacity: 1;
}

.msg-but-edit {
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #88a5ff;
}

.msg-but-del {
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #88a5ff;
}

.msg-action:hover {
    color: #3a6bff;
    background: #f4f7ff;
}

.msg-edit-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}
.msg-edit-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 56px;
    background: #fff;
    color: var(--fg);
}
.msg-edit-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}
.msg-edit-actions .btn-small {
    font-size: 12px;
    padding: 4px 10px;
    height: 26px;
}

.msg-edit-del {
    background: #2851cb;
    padding: 7px;
    border-radius: 6px;
    border: 1px solid #648bff;
}

.message-form {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: #fff;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.message-form textarea {
    flex: 1;
    resize: none;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    background: #f9fafb;
    color: var(--fg);
    min-height: 42px;
    max-height: 160px;
    transition: border-color 0.5s, background 0.5s;
}

.message-form textarea:focus {
    outline: none;
    background: #fff;
}
.btn-mess-ok {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-mess-ok i {
    font-size: 14px;
}

.dialog-blocked {
    padding: 14px 16px;
    background: #fff8e3;
    border-top: 1px solid #f0d478;
    color: #6a4b00;
    font-size: 13px;
    text-align: center;
}
.dialog-blocked i { margin-right: 6px; }

/* ============================================================
   Закрепление поста
   ============================================================ */
.btn-pin-active {
    background: #f0b400;
    color: #fff;
    border-color: #f0b400;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
.btn-pin-active:hover {
    background: #ffc30e;
    border-color: #ffc30e;
    color: #fff;
}

/* Закреплённый пост — визуальная метка */
.post-card--pinned {
    border-left: 3px solid #f0b400;
    position: relative;
}

.post-mark--pin {
	display: inline-block;
	padding: 2px;
	border-radius: 10px;
	margin-left: 6px;
	color: #fff;
	background: #f0b400;
	position: relative;
}

.post-mark-icon {
	width: 14px;
	height: 14px;
	object-fit: contain;
}

/* ============================================================
   Платное поднятие поста
   ============================================================ */
.btn-paid-boost {
	gap: 0px;
}

.btn-paid-boost:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-paid-boost-price {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* ============================================================
   Достижения в профиле
   ============================================================ */
.profile-achievements {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	padding: 0px 0px 4px 0px;
	justify-content: center;
}

.profile-achievement {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.5s;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
	padding: 44px;
	font-size: 12px;
	text-align: center;
}

.profile-achievement img {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.profile-achievement-emoji {
    font-size: 28px;
    line-height: 1;
}

/* Редкости — цветные рамки */
.profile-achievement.rarity-common {
    border-color: #ced6e1;
    background: linear-gradient(180deg, #f6f9ff 0%, #fff 100%);
}
.profile-achievement.rarity-rare {
	border-color: #ced6e1;
	background: linear-gradient(180deg, #f6f9ff 0%, #fff 100%);
}
.profile-achievement.rarity-epic {
	border-color: #ced6e1;
	background: linear-gradient(180deg, #f6f9ff 0%, #fff 100%);
}
.profile-achievement.rarity-legendary {
	border-color: #ced6e1;
	background: linear-gradient(180deg, #f6f9ff 0%, #fff 100%);
}

.notif-avatar-achievement {
    background: linear-gradient(135deg, #ffd166 0%, #f0b400 100%);
    color: #4a3200;
}
.notif-avatar-achievement i {
    font-size: 14px;
    line-height: 1;
}

/* ============================================================
   Тонкая полоса прокрутки для выпадающего списка уведомлений
   ============================================================ */

/* Firefox и современные Edge/Chrome */
.notif-dropdown {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* WebKit: Chrome, Safari, Opera, Edge */
.notif-dropdown::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.notif-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.notif-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.notif-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
    background-clip: padding-box;
}

.notif-dropdown::-webkit-scrollbar-corner {
    background: transparent;
}

.icon-info-4 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    flex-shrink: 0;
	transition: all 0.5s;
}

/* ============================================================
   Обратная связь (тикеты)
   ============================================================ */
.support-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 560px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.support-list {
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background: #fff;
}
.support-list-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    background: #f9fafb;
}
.support-list-body {
    flex: 1;
    overflow-y: auto;
    max-height: 480px;
}
.support-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--muted);
}
.support-empty i {
    font-size: 40px;
    color: #cbd5e1;
    display: block;
    margin-bottom: 10px;
}
.support-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f7;
    color: var(--fg);
    text-decoration: none;
    transition: all 0.5s;
}
.support-item:hover {
    background: #f6f9ff;
    color: var(--fg);
    text-decoration: none;
}
.support-item.is-active {
    background: #eef4ff;
    border-left: 3px solid #3a6bff;
    padding-left: 13px;
}
.support-item-subject {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}
.support-item-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    gap: 6px;
	align-items: center;
}
.support-status {
    display: inline-block;
    padding: 1px 8px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.support-status.is-open {
    background: #e3efff;
    color: #1667d9;
    border: 1px solid #b8d4ff;
}
.support-status.is-pending {
    background: #fff3cc;
    color: #b88600;
    border: 1px solid #f0d478;
}
.support-status.is-closed {
    background: #eef2f7;
    color: #4b5563;
    border: 1px solid #ced6e1;
}
.support-badge {
    display: inline-block;
    min-width: 20px;
    padding: 0 6px;
    height: 20px;
    line-height: 20px;
    background: #3a6bff;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    text-align: center;
}
.support-badge-otstup {
	margin-left: 6px;
}
.support-new-wrap {
    border-top: 1px solid var(--border);
    background: #f9fafb;
}
.support-new-toggle {
    cursor: pointer;
    padding: 13px 16px 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #2747a9;
}
.support-new-form {
    padding: 10px 16px 16px;
}
.support-new-form label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin: 8px 0 4px;
}
.support-new-form input,
.support-new-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
	color: var(--fg);
	transition: all 0.5s;
}

.support-new-form .btn {
    margin-top: 10px;
    width: 100%;
}
.support-thread-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-height: 100%;
}
.support-empty-thread {
    margin: auto;
    padding: 60px 20px;
    text-align: center;
    color: var(--muted);
}
.support-empty-thread i {
    font-size: 48px;
    color: #cbd5e1;
    display: block;
    margin-bottom: 12px;
}
.support-thread-head {
    padding: 13px 20px 12px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    background: #f9fafb;
}
.support-thread-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--fg);
    display: flex;
    align-items: center;
    gap: 10px;
}
.support-thread-id {
    color: var(--muted);
    font-size: 12px;
}
.support-thread {
    flex: 1;
    padding: 16px 20px;
    overflow-y: auto;
    max-height: 420px;
    background: #fff;
}
.support-msg {
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    max-width: 70%;
    word-wrap: break-word;
}
.support-msg-user {
    background: #f4f7ff;
    border: 1px solid #d6e0ff;
    margin-left: auto;
}
.support-msg-admin {
    background: #fff8e3;
    border: 1px solid #f0d478;
}
.support-msg-head {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 4px;
    gap: 12px;
	color: #4f5768;
}
.support-msg-body {
    font-size: 14px;
    color: var(--fg);
    line-height: 1.5;
}
.support-reply-form {
    padding: 12px 20px 20px;
    border-top: 1px solid var(--border);
    background: #f9fafb;
}
.support-reply-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 70px;
    background: #fff;
}
.support-reply-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 8px;
}
.support-closed-note {
	padding: 8px 0px;
	background: #eef2f7;
	border-top: 1px solid var(--border);
	color: var(--muted);
	text-align: center;
	font-size: 13px;
	position: relative;
	bottom: -23px;
	border-bottom: 1px solid var(--border);
	height: 37px;
}

/* Кнопка «Новое обращение» */
.support-new-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 16px;
    background: #3a6bff;
    color: #fff !important;
    border: 1px solid #3a6bff;
    border-radius: 8px;
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.5s;
}

.support-new-btn:hover {
    background: #5e86ff;
    border-color: #5e86ff;
    color: #fff !important;
}

.support-new-btn i {
    font-size: 13px;
}

/* Модалка нового обращения */
.support-new-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px 16px;
}

.support-new-dialog {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 520px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(20, 30, 70, 0.25);
    margin: auto;
}

.support-new-title {
    text-align: center;
    margin: 0 0 18px;
    font-size: 18px;
    color: var(--fg);
}

.support-new-title i {
    color: #3a6bff;
    margin-right: 6px;
}

.support-new-form label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin: 12px 0 6px;
}

.support-new-form label:first-of-type {
    margin-top: 0;
}

.support-new-form textarea {
    resize: vertical;
    min-height: 110px;
}

.support-new-form input:focus,
.support-new-form textarea:focus {
    outline: none;
    border-color: #3a6bff;
}

.support-new-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

.support-new-actions .btn {
    min-width: 120px;
}

/* ============================================================
   Модалка создания опроса
   ============================================================ */

.vote-create-modal {
    z-index: 1000;
}

.vote-create-dialog {
    max-width: 500px;
    width: 100%;
    padding: 0;
    border-radius: var(--radius);
    overflow: visible;
    box-shadow: 0 10px 30px rgba(20, 30, 70, 0.2);
    border: 1px solid var(--border);
    background: #fff;
}

/* Шапка модалки */
.vote-create-head {
    padding: 22px 24px 16px;
    text-align: center;
    background: #eef3ff;
    border-bottom: 1px solid #d6e0ff;
}

.vote-create-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #3a6bff;
    color: #fff;
    font-size: 24px;
    margin-bottom: 10px;
}

.vote-create-dialog .modal-title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: var(--fg);
    text-align: center;
}

.vote-create-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

/* Тело формы */
.vote-create-dialog .js-vote-create-form {
    padding: 22px 24px 20px;
}

.vote-create-dialog .form-row {
    margin-bottom: 18px;
}

.vote-create-dialog .form-row > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

/* Поля ввода */
.vote-create-dialog input[type="text"],
.vote-create-dialog select.select-custom {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--fg);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.vote-create-dialog input[type="text"]:focus,
.vote-create-dialog select.select-custom:focus {
    outline: none;
    border-color: #3a6bff;
}

/* Блок вариантов */
.vote-create-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.vote-create-options input[type="text"] {
    width: 100%;
}

/* Чекбокс «множественный выбор» */
.vote-create-row .checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 14px;
    color: var(--fg);
}

.vote-create-row .checkbox:hover {
    border-color: #b8d4ff;
    background: #f4f7ff;
}

.vote-create-row .checkbox input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #3a6bff;
    cursor: pointer;
    flex-shrink: 0;
}

/* Селект срока — переопределяем цвет стрелки на синий */
.vote-create-dialog select.select-custom {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%233a6bff' stroke-width='1.5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    appearance: none;
    cursor: pointer;
}

/* Блок цены */
.vote-create-price {
	padding: 6px;
	background: #f4f7ff;
	border: 1px solid #d6e0ff;
	border-radius: var(--radius-sm);
	font-size: 14px;
	color: #2747a9;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-bottom: 20px;
}

.vote-create-price b {
    font-size: 20px;
    color: #3a6bff;
    font-weight: 800;
}

.vote-create-price-hint {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #3a6bff;
    padding: 1px 8px;
    border-radius: 8px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

/* Сообщение об ошибке/успехе */
.vote-create-msg {
    min-height: 20px;
    font-size: 13px;
    text-align: center;
}

.vote-create-msg.is-error {
    color: var(--danger);
}

.vote-create-msg.is-success {
    color: var(--ok);
}

/* Кнопки */
.vote-create-dialog .modal-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	padding-top: 20px;
}

.vote-create-dialog .modal-actions .btn {
	flex: 1;
	min-width: 0;
}

.checkbox-vote {
	display: flex !important;
	align-items: center !important;
}

/* ============================================================
   Страница «Мои опросы»
   ============================================================ */

.my-votes-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.03);
    flex-wrap: wrap;
}

.my-votes-top .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 14px;
    font-weight: 500;
    height: auto;
    border-radius: var(--radius-sm);
}

.my-votes-top .btn.is-disabled,
.my-votes-top .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.my-votes-limit {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
    padding: 4px 10px;
    background: #f4f7ff;
    border: 1px solid #d6e0ff;
    border-radius: 6px;
}

/* Список опросов */
.my-votes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.my-vote-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.my-vote-body {
    min-width: 0;
}

.my-vote-question {
    display: block;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--fg);
    text-decoration: none;
    margin-bottom: 8px;
    word-wrap: break-word;
    transition: color 0.2s;
}

.my-vote-question:hover {
    color: #3a6bff;
}

.my-vote-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

.my-vote-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #f7f9fb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
}

.my-vote-meta > .support-status {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: transparent;
    border: 1px solid transparent;
}

.my-vote-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.my-vote-actions .btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.my-vote-actions .btn-danger {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.my-vote-actions .btn-danger:hover {
    background: #a5281c;
    border-color: #a5281c;
    color: #fff;
}

/* Общие стили списка вариантов (для карточки в ленте) */
.vote-options {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vote-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    color: var(--fg);
    transition: all 0.5s;
}

.vote-option label:hover {
    border-color: #3a6bff;
    background: #f4f7ff;
}

.vote-option input[type="radio"],
.vote-option input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #3a6bff;
    cursor: pointer;
    flex-shrink: 0;
}

.vote-option span {
    flex: 1;
    line-height: 1.4;
}

.vote-option label:has(input:checked) {
    border-color: #3a6bff;
    background: #eef3ff;
    box-shadow: 0 0 0 3px rgba(58, 107, 255, 0.1);
}

.vote-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.vote-meta {
	font-size: 14px;
}

.opros-but {
	color: #fff;
	background: #3a6bff;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
	padding: 2px 10px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	line-height: 1.6;
}

/* ============================================================
   Кастомный селект срока опроса
   ============================================================ */
.vote-days-select {
    position: relative;
    width: 100%;
}

.vote-days-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--fg);
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    text-align: left;
}

.vote-days-toggle:hover {
    border-color: #b8d4ff;
}

.vote-days-toggle:focus,
.vote-days-select.is-open .vote-days-toggle {
    outline: none;
    border-color: #3a6bff;
}

.vote-days-arrow {
    font-size: 11px;
    color: #3a6bff;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.vote-days-select.is-open .vote-days-arrow {
    transform: rotate(180deg);
}

.vote-days-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 10;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 0px 10px rgba(20, 30, 70, 0.1);
    max-height: 240px;
    overflow-y: auto;
}

.vote-days-list li {
    margin: 0;
}

.vote-days-option {
    display: block;
    width: 100%;
    padding: 4px 8px;
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    text-align: left;
    font-size: 14px;
    font-family: inherit;
    color: var(--fg);
    cursor: pointer;
    transition: all 0.5s;
	margin: 1px 0px;
}

.vote-days-option:hover {
    background: #f4f7ff;
    color: #3a6bff;
}

.vote-days-option.is-active {
    background: #e3efff;
    color: #3a6bff;
    font-weight: 600;
}

/* ============================================================
   Страница опроса /vote/{id}-{slug}
   ============================================================ */

.vote-full {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.03);
}

/* Шапка: автор + дата */
.vote-full .post-full-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	gap: 12px;
	flex-wrap: wrap;
}

.vote-full .post-date {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

/* Заголовок (вопрос) */
.vote-full .post-full-title {
	font-size: 18px;
	line-height: 1.3;
	margin: 10px 0px 7px 0px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Строка статуса: метка «Опрос», «Закрыт», «Можно выбрать несколько» */
.vote-status-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.vote-status-line .post-mark--vote {
    color: #fff;
    background: #3a6bff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    margin-left: 0;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.6;
}

.vote-closed {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 10px;
    border-radius: 10px;
    background: #eef2f7;
    color: #4b5563;
    border: 1px solid #ced6e1;
}

.vote-mode {
    font-size: 13px;
}

/* Форма голосования */
.vote-full-body {
    margin-top: 4px;
}

.vote-full .vote-options {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vote-full .vote-option label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.5s;
    font-size: 15px;
    background: #fff;
	transition: all 0.5s;
}

.vote-full .vote-option label:hover {
    border-color: #3a6bff;
    background: #f4f7ff;
}

.vote-full .vote-option input[type="radio"],
.vote-full .vote-option input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    accent-color: #3a6bff;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.vote-full .vote-option label:has(input:checked) {
    border-color: #3a6bff;
    background: #eef3ff;
    box-shadow: 0 0 0 3px rgba(58, 107, 255, 0.1);
}

.vote-full .vote-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 4px;
    flex-wrap: wrap;
}

.vote-full .vote-meta {
    color: var(--muted);
    font-size: 13px;
}

/* Результаты */
.vote-results {
	font-size: 14px;
}

.vote-full .vote-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.vote-full .vote-result {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vote-full .vote-result-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 15px;
}

.vote-full .vote-result-title {
    color: var(--fg);
    font-weight: 600;
}

.vote-full .vote-result-percent {
    color: #3a6bff;
    font-weight: 700;
    white-space: nowrap;
    font-size: 16px;
}

.vote-full .vote-result-bar {
    height: 12px;
    background: #eef3ff;
    border-radius: 6px;
    overflow: hidden;
}

.vote-full .vote-result-fill {
    height: 100%;
    background: linear-gradient(90deg, #3a6bff, #5e86ff);
    border-radius: 6px;
    transition: width 0.4s ease;
}

.vote-full .vote-result-count {
    font-size: 12px;
    color: var(--muted);
}

/* Итоговая строка */
.vote-full .vote-meta-full {
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

/* Футер для автора */
.vote-full-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.my-votes-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 600;
  height: auto;
  border-radius: var(--radius-sm);
}

/* ============================================================
   Эксклюзивные подарки — витрина
   ============================================================ */
.exclusive-gifts-head {
    text-align: center;
    margin-bottom: 18px;
}

.exclusive-gifts-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5e86ff 0%, #3a6bff 100%);
    color: #fff;
    font-size: 24px;
    margin-bottom: 10px;
}

.exclusive-gifts-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: var(--fg);
}

.exclusive-gifts-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

.exclusive-gifts-balance {
    text-align: center;
    font-size: 14px;
    color: #2747a9;
    margin: 0 0 20px;
}
.exclusive-gifts-balance b { font-weight: 700; }

.exclusive-gifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
    gap: 16px;
}

.exclusive-gift-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 22px 16px 16px;
    background: #fff;
    border: 1px solid #e5ecff;
    border-radius: 14px;
    box-shadow: 0 0px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.5s;
    overflow: visible;
    text-align: center;
}

.exclusive-gift-card:hover {
	border-color: #c3d7ff;
	box-shadow: 0 0px 20px rgba(0, 100, 255, 0.2);
	z-index: 6;
}

.exclusive-gift-card.is-owned {
    background: #f7f9ff;
    border-color: #d6e0ff;
}

.exclusive-gift-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #fff;
    background: linear-gradient(135deg, #5e86ff 0%, #3a6bff 100%);
    padding: 2px 10px;
    border-radius: 10px;
    text-shadow: 0 1px 0 rgba(0,0,0,0.2);
    box-shadow: 0 3px 8px rgba(58, 107, 255, 0.3);
	z-index: 4;
}

.exclusive-gift-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    margin-top: 6px;
	overflow: visible;
}

img.exclusive-gift-icon,
span.exclusive-gift-icon {
    display: block;
    width: 140px;
    height: 140px;
    object-fit: contain;
    font-size: 110px;
    line-height: 1;
    text-align: center;
    transition: transform 0.5s ease;
    transform-origin: center center;
	position: relative;
    z-index: 5;
}

.exclusive-gift-card:hover img.exclusive-gift-icon,
.exclusive-gift-card:active img.exclusive-gift-icon {
    transform: scale(2.0);
}

.exclusive-gift-card:hover span.exclusive-gift-icon,
.exclusive-gift-card:active span.exclusive-gift-icon {
    transform: scale(2.5);
    z-index: 5;
    position: relative;
}

.exclusive-gift-card-name {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--fg);
    word-wrap: break-word;
}

.exclusive-gift-card-price {
    display: inline-block;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: #3a6bff;
    padding: 4px 14px;
    border-radius: 50px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.exclusive-gift-card-stock {
    width: 100%;
    margin-top: 4px;
}

.exclusive-gift-card-stock-bar {
    height: 8px;
    background: #eef3ff;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.exclusive-gift-card-stock-fill {
    height: 100%;
    background: linear-gradient(90deg, #5e86ff, #3a6bff);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.exclusive-gift-card-stock-text {
    font-size: 12px;
    color: var(--muted);
}
.exclusive-gift-card-stock-text b {
    color: #2747a9;
    font-weight: 700;
}

.exclusive-gift-card-buy {
    width: 100%;
    margin-top: auto;
    justify-content: center;
}

.exclusive-gift-card-buy:disabled {
    background: #cbd5e1;
    border-color: #cbd5e1;
    color: #fff;
    cursor: not-allowed;
    text-shadow: none;
    opacity: 1;
}

/* Редкости на витрине эксклюзивов */
.exclusive-gift-card.rarity-rare      { border-color: #7fb2ff; }
.exclusive-gift-card.rarity-epic      { border-color: #b48cff; }
.exclusive-gift-card.rarity-legendary { border-color: #f0b400; }

/* ============================================================
   Эксклюзивный подарок в профиле
   ============================================================ */
.profile-gift-badge.rarity-exclusive {
	box-shadow: 0 5px 5px rgba(0, 0, 0, 0.3);
	background: linear-gradient(10deg, #5a81f4, #ffc6c6);
	border: 2px solid #fff;
}

.profile-gift-badge.rarity-exclusive:hover,
.profile-gift-badge.rarity-exclusive:active {
    z-index: 4;
}

.profile-gift-badge.rarity-exclusive .profile-gift-badge-name,
.profile-gift-badge.rarity-exclusive .profile-gift-badge-price {
    color: #fff;
}

.profile-gift-badge.rarity-exclusive .profile-gift-badge-price {
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.profile-gift-exclusive-mark {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #fff;
    background: #3a6bff;
    padding: 1px 8px;
    border-radius: 8px;
    text-shadow: 0 1px 0 rgba(0,0,0,0.2);
    z-index: 3;
    white-space: nowrap;
}

/* Разделитель в админке */
.admin-gifts-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 16px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.admin-gifts-separator::before,
.admin-gifts-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.gift-field-exclusive {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--fg);
    cursor: pointer;
    padding: 0 4px;
}
.gift-field-exclusive input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* ============================================================
   Страница «Все категории»
   ============================================================ */

.categories-page-head {
    text-align: center;
    margin-bottom: 18px;
}

.categories-page-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5e86ff 0%, #3a6bff 100%);
    color: #fff;
    font-size: 24px;
    margin-bottom: 10px;
}

.categories-page-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: var(--fg);
}

.categories-page-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--fg);
    transition: all 0.5s;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.03);
}

.category-card:hover {
    border-color: #b9c4ff;
    background: #f7faff;
    text-decoration: none;
    color: #3a6bff;
}

.category-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: #f4f7ff;
    border-radius: 10px;
    border: 1px solid #e5ecff;
    transition: all 0.3s;
}

.category-card-icon img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.category-card-icon i {
    color: #3a6bff;
    font-size: 18px;
}

.category-card:hover .category-card-icon {
	background: #e8efff;
	border-color: #b9c4ff;
}

.category-card:hover .category-card-icon i {
    color: #fff;
}

.category-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.category-card-name {
    font-size: 15px;
    font-weight: 600;
    color: inherit;
    line-height: 1.3;
    word-wrap: break-word;
}

.category-card-count {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.category-card-arrow {
    flex-shrink: 0;
    color: #cbd5e1;
    font-size: 13px;
    transition: all 0.3s;
}

.category-card:hover .category-card-arrow {
    color: #3a6bff;
    transform: translateX(2px);
}

button.profile-stat-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
    margin-right: 5px;
    transition: all 0.5s;
}
button.profile-stat-link:hover {
    color: #3a6bff;
}

/* ============================================================
   Модалка подписчиков/подписок (чужой профиль, Premium)
   Без transform: scale. Все transition ≥ 0.5s.
   ============================================================ */

/* Кнопка-статистика в профиле, оформленная как ссылка.
   Используется только для .js-subs-modal в profile.php. */
button.profile-stat-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0 5px 0 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
    transition: all 0.5s;
    display: inline;
}
button.profile-stat-link:hover {
    color: #3a6bff;
}
button.profile-stat-link b {
    font-weight: 700;
}

/* Сам оверлей — берём систему .modal-overlay, но чуть плотнее */
.subs-modal-overlay {
    z-index: 1100;
}

/* Диалог */
.subs-modal {
    max-width: 480px;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(20, 30, 70, 0.25);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
}

/* Шапка */
.subs-modal-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 18px 14px;
	border-bottom: 1px solid var(--border);
	background: linear-gradient(135deg, #eef3ff 0%, #f6f2ff 100%);
}

.subs-modal-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0 44px;
    font-size: 17px;
    font-weight: 700;
    color: var(--fg);
    white-space: nowrap;
    pointer-events: none;
}

.subs-modal-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.5s;
    padding: 0;
}
.subs-modal-close:hover {
	background: #f4f4f4;
}

/* Табы */
.subs-modal-tabs {
    display: flex;
    gap: 4px;
    padding: 10px 14px 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
	justify-content: center;
}

.subs-modal-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px 10px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.5s;
    margin-bottom: -1px;
}
.subs-modal-tab:hover {
    color: #3a6bff;
}
.subs-modal-tab.is-active {
    color: #3a6bff;
    border-bottom-color: #3a6bff;
}
.subs-modal-tab i {
    font-size: 13px;
}

/* Тело модалки — скроллится, если список длинный */
.subs-modal-body {
    flex: 1;
    min-height: 120px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 12px 0;
    background: #fff;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.subs-modal-body::-webkit-scrollbar {
    width: 6px;
}
.subs-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Лоадер */
.subs-modal-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--muted);
    font-size: 14px;
}
.subs-modal-loader i {
    color: #3a6bff;
    font-size: 18px;
}

/* Пустое состояние / ошибка */
.subs-modal-empty {
    padding: 30px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

/* Список */
.subs-modal-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.subs-modal-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 18px;
	border: 1px solid #e5e7eb;
	background: #fcfbff;
	border-radius: 6px;
	margin: 0px 10px 2px 10px;
	box-shadow: 0 3px 5px rgba(0, 0, 0, 0.05);
}

.subs-modal-avatar {
    display: inline-flex;
    flex-shrink: 0;
    line-height: 0;
}

.subs-modal-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}
.subs-modal-name .badge-premium {
    margin: 0;
    font-size: 9px;
    padding: 0 5px;
}

/* Подпись «Показаны первые N» */
.subs-modal-more {
    margin: 0;
    padding: 12px 18px 14px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid #f1f3f7;
}

.subs-modal-link {
    color: inherit;
    text-decoration: none;
    transition: all 0.5s;
}
.subs-modal-link:hover {
    color: #3a6bff;
    text-decoration: none;
}

a.subs-modal-avatar {
    text-decoration: none;
    line-height: 0;
}

/* ============================================================
   Фильтр ленты по периоду (главная страница)
   Стиль — как .vote-days-* (кастомный селект срока опроса).
   ============================================================ */

.feed-period {
    position: relative;
    width: 94px;
    margin: 0 0 4px 0;
    z-index: 20;
}

.feed-period-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border: 1px solid #f7f9fb;
    border-color: rgb(247, 249, 251);
	border-radius: var(--radius-sm);
	background: #f7f9fb;
	color: var(--fg);
	font-size: 14px;
	font-family: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.5s;
	box-sizing: border-box;
	text-align: left;
}

.feed-period-toggle:focus,
.feed-period.is-open .feed-period-toggle {
    outline: none;
}

.feed-period-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-period-arrow {
    font-size: 11px;
    color: #3a6bff;
    transition: transform 0.5s;
    flex-shrink: 0;
    margin-left: 8px;
}

.feed-period.is-open .feed-period-arrow {
    transform: rotate(180deg);
}

.feed-period-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 30;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 5px 10px rgba(20, 30, 70, 0.1);
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.feed-period-list::-webkit-scrollbar {
    width: 6px;
}

.feed-period-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.feed-period-list li {
    margin: 0;
}

.feed-period-option {
    display: block;
    width: 100%;
    padding: 4px 6px;
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    text-align: left;
    font-size: 14px;
    font-family: inherit;
    color: var(--fg);
    cursor: pointer;
    transition: all 0.5s;
    margin: 1px 0;
}

.feed-period-option:hover {
    background: #f4f7ff;
    color: #3a6bff;
}

.feed-period-option.is-active {
    background: #e3efff;
    color: #3a6bff;
    font-weight: 600;
}

.btn-ed-2 { max-height: 37px !important; }

/* ============================================================
   Модалка «Реквизиты для перевода» (реальные донаты)
   Без transform: scale. Все transition ≥ 0.5s.
   ============================================================ */

.real-donate-overlay {
    z-index: 1100;
}

.real-donate-modal {
    max-width: 440px;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(20, 30, 70, 0.25);
    display: flex;
    flex-direction: column;
}

/* Шапка */
.real-donate-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #eef3ff 0%, #f6f2ff 100%);
}

.real-donate-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0 44px;
    font-size: 17px;
    font-weight: 700;
    color: var(--fg);
    white-space: nowrap;
    pointer-events: none;
}

.real-donate-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.5s;
    padding: 0;
    z-index: 1;
}

.real-donate-close:hover {
	background: #f4f4f4;
}

/* Тело */
.real-donate-body {
    padding: 20px 22px 22px;
    background: #fff;
}

.real-donate-to {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

.real-donate-to b {
    color: #2747a9;
    font-weight: 700;
}

/* Строка «Банк» / «Номер карты» */
.real-donate-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fcfbff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.real-donate-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    flex-shrink: 0;
}

.real-donate-value {
    font-size: 15px;
    color: #2747a9;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.real-donate-card {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 16px;
    letter-spacing: 0.5px;
    color: #2747a9;
}

/* Кнопка «Скопировать» */
.real-donate-copy {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.5s;
    padding: 0;
    flex-shrink: 0;
}

.real-donate-copy:hover {
	background: #f4f4f4;
}

/* Дисклеймер */
.real-donate-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: 16px 0 0;
    padding: 10px 12px;
    background: #fff8e3;
    border: 1px solid #f0d478;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: #6a4b00;
}

.real-donate-note i {
    color: #f0b400;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ============================================================
   Заявки на подписку (модерация автором, Premium)
   Классы: .sub-req-badge, .sub-req-item, .sub-req-actions,
           .sub-req-btn, .sub-req-btn--approve
   ============================================================ */

/* Бейдж с числом заявок на табе «Заявки» */
.sub-req-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 6px;
    margin-left: 6px;
    background: #c0392b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border-radius: 10px;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    transition: all 0.5s;
}

.account-tab.is-active .sub-req-badge {
    background: #fff;
    color: #3a6bff;
    box-shadow: none;
}

/* Карточка заявки — наследует .subs-item, добавляем мелкие правки */
.sub-req-item {
    /* .subs-item даёт display:flex, gap, padding, border */
    /* Ничего не переопределяем — только фиксируем возможные особенности */
    align-items: center;
}

/* Блок кнопок действий */
.sub-req-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* Общая кнопка действия */
.sub-req-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.5s;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.sub-req-btn i {
    font-size: 11px;
}

.sub-req-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Кнопка «Принять» — зелёная */
.sub-req-btn--approve {
    background: #16a34a;
    border: 1px solid #16a34a;
    color: #fff;
}

.sub-req-btn--approve:hover:not(:disabled) {
	background: #169145;
	border-color: #169145;
	color: #fff;
}

/* Кнопка «Отклонить» — серая (btn-cancel даёт базу, дошлифуем) */
.sub-req-btn.js-sub-req-reject {
    background: #9ca3af;
    border-color: #9ca3af;
    color: #fff;
}

.sub-req-btn.js-sub-req-reject:hover:not(:disabled) {
    background: #8c96a9;
    border-color: #818897;
    color: #fff;
}

/* Кнопка «Блок» — красная (btn-danger даёт базу, дошлифуем) */
.sub-req-btn.js-sub-req-block {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

.sub-req-btn.js-sub-req-block:hover:not(:disabled) {
    background: #a5281c;
    border-color: #a5281c;
    color: #fff;
}

/* Уведомления: заявка на подписку */
.notif-avatar-sub-request {
    background: linear-gradient(135deg, #dbeafe 0%, #3a6bff 100%);
    color: #fff;
}
.notif-avatar-sub-request i {
    font-size: 14px;
    line-height: 1;
}

/* Уведомления: одобрение заявки */
.notif-avatar-sub-approved {
    background: linear-gradient(135deg, #dcfce7 0%, #16a34a 100%);
    color: #fff;
}
.notif-avatar-sub-approved i {
    font-size: 14px;
    line-height: 1;
}

.sub-icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.btn-zayavka {
	width: 136px;
}

/* ============================================================
   Модалка «О себе» (полное bio профиля)
   Без transform: scale. Все transition ≥ 0.5s.
   ============================================================ */

/* Кнопка-ссылка «О себе» в шапке профиля */
.profile-bio-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0px 0px 2px 0px;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.5s;
    text-align: left;
}

.profile-bio-link i {
    font-size: 13px;
    color: #3a6bff;
    transition: all 0.5s;
}

.profile-bio-link:hover {
    color: #3a6bff;
}

.profile-bio-link:hover i {
    color: #5e86ff;
}

/* На профиле с баннером (текст поверх картинки) — белый цвет */
.profile-top--with-cover .profile-bio-link {
    color: #fff;
}

.profile-top--with-cover .profile-bio-link i {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.profile-top--with-cover .profile-bio-link:hover {
    color: #fff000;
}

.profile-top--with-cover .profile-bio-link:hover i {
    color: #fff000;
}

/* Оверлей модалки */
.bio-modal-overlay {
    z-index: 1100;
}

/* Диалог */
.bio-modal {
    max-width: 520px;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(20, 30, 70, 0.25);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
}

/* Шапка */
.bio-modal-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #eef3ff 0%, #f6f2ff 100%);
}

.bio-modal-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0 44px;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
}

.bio-modal-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.5s;
    padding: 0;
    z-index: 1;
}

.bio-modal-close:hover {
	background: #f4f4f4;
}

/* Тело модалки — скроллится, если bio длинный */
.bio-modal-body {
    flex: 1;
    min-height: 80px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 18px 22px 22px;
    background: #fff;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.bio-modal-body::-webkit-scrollbar {
    width: 6px;
}

.bio-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Текст bio */
.bio-modal-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--fg);
    word-wrap: break-word;
    white-space: normal;
}

/* О себе: растягивание только по вертикали */
#bio {
    width: 100%;
    max-width: 100%;
    resize: vertical;
    min-height: 80px;
    max-height: 400px;
    box-sizing: border-box;
}

/* ============================================================
   Поле «О себе» на /settings — растягивание только вниз,
   ширина по родителю, тонкая полоса прокрутки.
   ============================================================ */
#bio {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 80px;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

#bio::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#bio::-webkit-scrollbar-track {
    background: transparent;
}

#bio::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
    border: 1px solid transparent;
    background-clip: padding-box;
}

#bio::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
    background-clip: padding-box;
}

#bio::-webkit-scrollbar-corner {
    background: transparent;
}

/* ============================================================
   Якоря для флеш-сообщений возле кнопок (settings и др.)
   ============================================================ */
.form-actions-anchor {
    /* Не сдвигает кнопку, если сообщения нет */
    display: block;
}

.form-actions-anchor:empty {
    display: none;
}

.form-actions-anchor .auth-success,
.form-actions-anchor .auth-error {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

.form-actions-anchor .auth-success {
  background: #e8efff;
  color: #3a6bff;
  border: 1px solid #a9bcf6;
  margin: 0 auto;
  display: inline-block;
  width: auto;
  min-width: 100px;
  max-width: 100%;
  padding: 10px 16px;
  text-align: center;
}

.form-actions-anchor .auth-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ffbcbc;
    margin: 0 auto;
    display: inline-block;
    width: auto;
    min-width: 100px;
    max-width: 100%;
    padding: 10px 16px;
    text-align: center;
}

.set-otstup {margin-bottom: 20px;}
.set-otstup-2 {margin-bottom: -4px; margin-top: -4px;}
.set-otstup-3 {margin-top: 20px;}
.set-otstup-4 {margin-bottom: -6px;}
.set-otstup-5 {margin-bottom: -4px;}

/* ============================================================
   Якоря для флеш-сообщений: не прижимать к верхней границе,
   оставлять воздух над кнопкой.
   ============================================================ */
.form-actions-anchor {
    scroll-margin-top: 50vh;
}

.admin-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}
.admin-actions form {
    display: inline;
    margin: 0;
}

.admin-actions-center {text-align: center;}

/* ============================================================
   Комментарии: тонкая полоса прокрутки в textarea
   Стиль согласован с .notif-dropdown / #bio / .bio-modal-body
   ============================================================ */
.comment-form textarea,
.js-comment-reply-form textarea,
.js-comment-edit-form textarea,
.comment-edit-form textarea {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    resize: vertical;
}

.comment-form textarea::-webkit-scrollbar,
.js-comment-reply-form textarea::-webkit-scrollbar,
.js-comment-edit-form textarea::-webkit-scrollbar,
.comment-edit-form textarea::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.comment-form textarea::-webkit-scrollbar-track,
.js-comment-reply-form textarea::-webkit-scrollbar-track,
.js-comment-edit-form textarea::-webkit-scrollbar-track,
.comment-edit-form textarea::-webkit-scrollbar-track {
    background: transparent;
}

.comment-form textarea::-webkit-scrollbar-thumb,
.js-comment-reply-form textarea::-webkit-scrollbar-thumb,
.js-comment-edit-form textarea::-webkit-scrollbar-thumb,
.comment-edit-form textarea::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.comment-form textarea::-webkit-scrollbar-thumb:hover,
.js-comment-reply-form textarea::-webkit-scrollbar-thumb:hover,
.js-comment-edit-form textarea::-webkit-scrollbar-thumb:hover,
.comment-edit-form textarea::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
    background-clip: padding-box;
}

.comment-form textarea::-webkit-scrollbar-corner,
.js-comment-reply-form textarea::-webkit-scrollbar-corner,
.js-comment-edit-form textarea::-webkit-scrollbar-corner,
.comment-edit-form textarea::-webkit-scrollbar-corner {
    background: transparent;
}

/* Скрыть блок «Уведомления» на /settings */
.settings-subtitle + form[action="/settings"] input[name="action"][value="notify"] {
}

/* Публичный адрес: инпут с префиксом */
.username-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    overflow: hidden;
}

.username-prefix {
    padding: 8px 10px;
    background: #f7f9fb;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
    border-right: 1px solid var(--border);
    user-select: none;
}

.username-input-wrap input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: none;
    font-size: 15px;
    font-family: inherit;
    background: transparent;
    color: var(--fg);
    outline: none;
}

.profile-actions .js-profile-action-icon {
    display: none;
}

/* ============================================================
   Тонкая полоса прокрутки для страницы (глобально)
   ============================================================ */

html {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

html::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

html::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
    border: 1px solid transparent;
    background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
    background-clip: padding-box;
}

html::-webkit-scrollbar-corner {
    background: transparent;
}

/* Убираем focus-обводку у поля поиска в шапке */
.header-search input[name="q"]:focus,
.header-search input[name="q"]:focus-visible {
    outline: none;
    box-shadow: none;
    border: none;
}

/* ============================================================
   Кастомный селект «Тема» в редакторе поста
   ============================================================ */
.select-custom-wrap {
    position: relative;
    width: 100%;
}

.select-custom-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 15px;
    color: var(--fg);
    cursor: pointer;
    text-align: left;
}

.select-custom-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-custom-arrow {
    font-size: 11px;
    color: #3a6bff;
    transition: transform 0.5s;
    flex-shrink: 0;
    margin-left: 8px;
}

.select-custom-wrap.is-open .select-custom-arrow {
    transform: rotate(180deg);
}

.select-custom-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 30;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 5px 10px rgba(20, 30, 70, 0.1);
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.select-custom-list::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.select-custom-list::-webkit-scrollbar-track {
    background: transparent;
}

.select-custom-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.select-custom-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
    background-clip: padding-box;
}

.select-custom-list li {
    margin: 0;
}

.select-custom-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    font: inherit;
    font-size: 14px;
    color: var(--fg);
    text-align: left;
    cursor: pointer;
    transition: all 0.5s;
}

.select-custom-option:hover {
    background: #f4f7ff;
    color: #3a6bff;
}

.select-custom-option.is-active {
    background: #e3efff;
    color: #3a6bff;
    font-weight: 600;
}

/* ============================================================
   Загрузка аватара: стилизованная кнопка
   ============================================================ */
.avatar-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}

/* Скрываем нативный <input type="file"> */
.avatar-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Кнопка «Выбрать аватар» — тот же .btn, но с иконкой */
.avatar-upload-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.avatar-upload-btn i {
    font-size: 13px;
}

.avatar-upload-btn:hover {
    /* уже задано через .btn:hover */
}

/* Кнопка «Удалить» — рядом с «Выбрать аватар» */
.avatar-remove-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ============================================================
   Зум картинок в полном посте
   ============================================================ */

/* Диалог-модалка */
.img-zoom-dialog {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    padding: 0;
    margin: 0;
    border: none;
    background: rgba(15, 23, 42, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.img-zoom-dialog[open] {
    display: flex;
}

.img-zoom-dialog::backdrop {
    background: rgba(15, 23, 42, 0.9);
}

.img-zoom-img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: default;
    user-select: none;
}

/* Кнопка закрытия */
.img-zoom-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 2001;
}

.img-zoom-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   Редактор: модалка вставки таблицы
   ============================================================ */
.table-modal {
    max-width: 420px;
    width: 100%;
}

.table-modal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.table-modal-row label {
    font-size: 14px;
    font-weight: 600;
    color: var(--fg);
}

.table-modal-row input[type="number"] {
    width: 90px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.table-modal-row input[type="number"]:focus {
    outline: none;
    border-color: #3a6bff;
}

/* Таблицы в постах и в редакторе */
.post-full-content table,
.editor-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0px 4px 0px;
    font-size: 14px;
    background: #fff;
    border: 1px solid var(--border);
}

/* Обычная таблица — в редакторе: заголовки */
.editor-content table th {
    padding: 4px;
    border: 1px solid var(--border);
    vertical-align: top;
    background: #f7f9fb;
}

/* Обычная таблица — в редакторе: обычные ячейки */
.editor-content table td {
    padding: 0px;
    border: 1px solid var(--border);
    vertical-align: top;
}

/* Обычная таблица — в предпросмотре / на странице поста: заголовки */
.post-full-content table th {
    padding: 8px;
    border: 1px solid var(--border);
    vertical-align: top;
    background: #f7f9fb;
}

/* Обычная таблица — в предпросмотре / на странице поста: обычные ячейки */
.post-full-content table td {
    padding: 0px;
    border: 1px solid var(--border);
    vertical-align: top;
}

/* ============================================================
   Редактор: панель управления таблицей
   ============================================================ */
   
.editor-tablebar {
	display: flex;
	align-items: center;
	gap: 2px;
	flex-wrap: wrap;
	overflow-x: auto;
	font-size: 11px;
	padding: 4px;
	margin-top: 1px;
	background: #f0f4ff;
	border-top: 1px solid #e7ecff;
	border-bottom: 1px solid #e7ecff;
}

.editor-tablebar .editor-tablebar-label {
    color: #666;
    margin-right: 0px;
}

.editor-tablebar .editor-btn {
	min-width: 36px;
	height: 46px;
	padding: 0 6px;
	background: #fff;
	border: 1px solid #e0e0e0;
    border-top-color: rgb(224, 224, 224);
    border-right-color: rgb(224, 224, 224);
    border-bottom-color: rgb(224, 224, 224);
    border-left-color: rgb(224, 224, 224);
	border-radius: 4px;
	cursor: pointer;
	font-size: 10px;
}

.editor-tablebar .editor-btn i {font-size: 14px;}

.editor-tablebar .editor-btn:hover {
	background: #d9e2ff;
	border-color: #b9c4ff;
	color: #3a6bff;
}

.editor-tablebar .editor-btn.is-active {
	background: #d9e2ff;
	border-color: #b9c4ff;
}

/* Активная таблица в редакторе */
.editor-content table.is-selected {
    outline: 2px solid #e7ecff;
    outline-offset: 2px;
}

/* Выравнивание таблицы */
.editor-content table[data-align="left"],
.post-full-content table[data-align="left"] {
    margin-left: 0;
    margin-right: auto;
}

.editor-content table[data-align="center"],
.post-full-content table[data-align="center"] {
    margin-left: auto;
    margin-right: auto;
}

.editor-content table[data-align="right"],
.post-full-content table[data-align="right"] {
    margin-left: auto;
    margin-right: 0;
}

.editor-content table[data-align="full"],
.post-full-content table[data-align="full"] {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Если открыты обе панели — tablebar идёт вплотную к imgbar */
.editor-imgbar:not([hidden]) + .editor-tablebar:not([hidden]) {
    border-top: none;
}

/* ============================================================
   Редактор: стили таблицы
   ============================================================ */

/* Прозрачная: никаких рамок и фона — видно только содержимое ячеек */
.post-full-content table[data-style="transparent"],
.editor-content table[data-style="transparent"] {
    border: none;
    background: transparent;
}

/* Прозрачная таблица — в редакторе: заголовки */
.editor-content table[data-style="transparent"] th {
    background: transparent;
    padding: 4px;
    border: 1px solid transparent;
    vertical-align: top;
}

/* Прозрачная таблица — в редакторе: обычные ячейки */
.editor-content table[data-style="transparent"] td {
    background: transparent;
    padding: 0px;
    border: 1px solid transparent;
    vertical-align: top;
}

/* Прозрачная таблица — в предпросмотре / на странице поста: заголовки */
.post-full-content table[data-style="transparent"] th {
    background: transparent;
    padding: 8px;
    border: 1px solid transparent;
    vertical-align: top;
}

/* Прозрачная таблица — в предпросмотре / на странице поста: обычные ячейки */
.post-full-content table[data-style="transparent"] td {
    background: transparent;
    padding: 0px;
    border: 1px solid transparent;
    vertical-align: top;
}

/* Если в ячейке только картинка — убираем любые отступы */
.post-full-content table[data-style="transparent"] td img,
.editor-content table[data-style="transparent"] td img {
    display: block;
    margin: 0 auto;
}

/* В редакторе для наглядности — тонкий контур по hover */
.editor-content table[data-style="transparent"]:hover {
    outline: 1px dashed #cbd5e1;
    outline-offset: 2px;
}

/* Убираем пустоту под картинками внутри таблицы */
.post-full-content table td figure.post-image,
.post-full-content table th figure.post-image,
.editor-content table td figure.post-image,
.editor-content table th figure.post-image {
    margin: 4px;
    padding: 0;
    line-height: 0;
}

/* Сама картинка в ячейке таблицы — без отступов снизу и «строчного зазора» */
.post-full-content table td figure.post-image img,
.post-full-content table th figure.post-image img,
.editor-content table td figure.post-image img,
.editor-content table th figure.post-image img {
    display: block;
    margin: 0;
    vertical-align: top;
}

/* Ячейка таблицы — без лишних отступов, если внутри только картинка */
.post-full-content table td:has(> figure.post-image),
.post-full-content table th:has(> figure.post-image),
.editor-content table td:has(> figure.post-image),
.editor-content table th:has(> figure.post-image) {
    padding: 0;
    line-height: 0;
    font-size: 0;
}

/* Ячейка со «прозрачной» таблицей — вообще без отступов */
.post-full-content table[data-style="transparent"] td figure.post-image,
.post-full-content table[data-style="transparent"] th figure.post-image,
.editor-content table[data-style="transparent"] td figure.post-image,
.editor-content table[data-style="transparent"] th figure.post-image {
    margin: 4px;
    line-height: 0;
}

/* ============================================================
   Редактор: модалка HTML-кода
   ============================================================ */
.html-edit-modal {
    max-width: 720px;
    width: 100%;
}

.html-edit-hint {
    text-align: left;
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 10px;
    line-height: 1.5;
}

.html-edit-hint code {
    padding: 1px 6px;
    background: #f4f4f4;
    border-radius: 3px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    color: #c0392b;
}

#htmlEditTextarea {
    width: 100%;
    min-height: 320px;
    max-height: 60vh;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
    background: #f9fafb;
    color: var(--fg);
    resize: vertical;
    box-sizing: border-box;
    white-space: pre;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

#htmlEditTextarea:focus {
    outline: none;
	background: #f9fafb;
}

#htmlEditTextarea::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#htmlEditTextarea::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.html-edit-modal .modal-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.html-edit-modal .modal-actions .btn {
    min-width: 130px;
}

#htmlEditModal,
#tableInsertModal {
    z-index: 10000;
}

/* ============================================================
   Редактор: попап «Канцелярия» (5 SVG-иконок)
   ============================================================ */
.editor-icons-wrap {
    position: relative;
    display: inline-block;
}

.editor-icons-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 26px);
    gap: 4px;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 5px 10px rgba(20, 30, 70, 0.1);
	width: max-content;
}

.editor-icon-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.5s;
	background: transparent;
}

.editor-icon-item:hover {
    background: #f4f7ff;
    border-color: #b9c4ff;
}

.editor-icon-item img {
    width: 24px;
    height: 24px;
    display: block;
    pointer-events: none;
	padding: 0px;
}

.editor-content img.editor-icon {
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0px 0px 4px 0px;
    display: inline-block;
    vertical-align: middle;
    border: 0;
    border-radius: 0;
}

.post-full-content img.editor-icon {
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0px 0px 4px 0px;
    display: inline-block;
    vertical-align: middle;
    border: 0;
    border-radius: 0;
}

/* ============================================================
   Редактор: тонкая полоса прокрутки в .editor-content
   Стиль согласован с .bio-modal-body / #bio / .notif-dropdown
   ============================================================ */
.editor-content {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.editor-content::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.editor-content::-webkit-scrollbar-track {
    background: transparent;
}

.editor-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.editor-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
    background-clip: padding-box;
}

.editor-content::-webkit-scrollbar-corner {
    background: transparent;
}

/* ============================================================
   Редактор: попап «Видео»
   ============================================================ */
.editor-video-wrap {
    position: relative;
    display: inline-block;
}

.editor-video-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 45;
    width: 320px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 14px rgba(20, 30, 70, 0.12);
}

.editor-video-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}

.editor-video-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    color: var(--fg);
    box-sizing: border-box;
}

.editor-video-input:focus {
    outline: none;
    border-color: #3a6bff;
}

.editor-video-msg {
    min-height: 16px;
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.editor-video-msg.is-error {
    color: var(--danger);
}

.editor-video-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 8px;
}

.editor-video-actions .btn {
    min-width: 90px;
}

/* ============================================================
   Адаптивный <iframe> в постах (16:9)
   ============================================================ */
.post-full-content .video-embed,
.editor-content .video-embed {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 1em 0;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 6px;
}

.post-full-content .video-embed iframe,
.editor-content .video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.post-full-content > iframe,
.editor-content > iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 6px;
    margin: 1em 0;
}

.editor-content:focus,
.editor-content:focus-visible {
    outline: none;
    box-shadow: none;
}