/* ============================================================
   Destiny: форум, магазин, аккаунт — общие стили сообщества
   ============================================================ */

.container.community {
    max-width: 1100px;
    padding-top: 40px;
    padding-bottom: 70px;
}

.community h1,
.community h2,
.community h3 {
    font-family: 'Cinzel', serif;
    color: var(--text-light);
}

.community h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 6px; }
.community h2 { font-size: 1.25rem; margin-bottom: 16px; }
.community h3 { font-size: 1.05rem; margin: 18px 0 10px; }
.community a { color: var(--gold); }

.community-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.community-sub {
    color: #8f8f8f;
    font-size: 0.95rem;
}

.community .btn {
    display: inline-block;
    padding: 10px 22px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dark-bg);
    background: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 2px;
    text-decoration: none;
    cursor: pointer;
    animation: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.community .btn:hover {
    background: var(--gold-hover);
    border-color: var(--gold-hover);
    color: var(--dark-bg);
}

.community .btn-outline {
    background: transparent;
    color: var(--gold);
}

.community .btn-outline:hover {
    background: var(--gold);
    color: var(--dark-bg);
}

.community .btn-danger {
    background: #8f2d2d;
    border-color: #8f2d2d;
    color: #fff;
}

.community .btn-danger:hover { background: #b23a3a; }

.community .btn-sm { padding: 6px 12px; font-size: 0.78rem; }

.community-card {
    background: var(--panel-bg);
    border: 1px solid rgba(201, 164, 92, 0.18);
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 22px;
}

.community-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.community-crumbs {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.community-crumbs a { color: #a9a9a9; text-decoration: none; }
.community-crumbs a:hover { color: var(--gold); }

.community-alert {
    border: 1px solid rgba(201, 164, 92, 0.4);
    background: rgba(201, 164, 92, 0.08);
    color: #d8c49a;
    padding: 12px 16px;
    border-radius: 3px;
    margin-bottom: 18px;
    font-size: 0.92rem;
}

.community-alert ul { margin: 0; padding-left: 18px; }

.community-alert--ok {
    border-color: rgba(95, 168, 95, 0.5);
    background: rgba(95, 168, 95, 0.08);
    color: #a8d8a8;
}

.community-alert--error {
    border-color: rgba(180, 70, 70, 0.55);
    background: rgba(180, 70, 70, 0.08);
    color: #e0a3a3;
}

.community-empty {
    color: #888;
    text-align: center;
    padding: 20px 0;
}

.community-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}


.community-form .community-field { display: block; margin-bottom: 16px; }

.community-field > span {
    display: block;
    margin-bottom: 6px;
    color: #c9c9c9;
    font-size: 0.88rem;
}

.community-field input[type="text"],
.community-field input[type="email"],
.community-field input[type="number"],
.community-field input[type="password"],
.community-field input[type="tel"],
.community-field select,
.community-field textarea,
.community-form input[type="text"],
.community-form input[type="email"],
.community-form input[type="number"],
.community-form select,
.community-form textarea {
    width: 100%;
    background: #121216;
    border: 1px solid rgba(201, 164, 92, 0.3);
    border-radius: 3px;
    color: var(--text-light);
    padding: 10px 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
}

.community-field textarea,
.community-form textarea { resize: vertical; }

.community-field input:focus,
.community-field select:focus,
.community-field textarea:focus,
.community-form input:focus,
.community-form select:focus,
.community-form textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(201, 164, 92, 0.15);
}

.community-hint {
    color: #7d7d7d;
    font-size: 0.82rem;
    margin: 10px 0 16px;
}

.community-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 16px;
    color: #c9c9c9;
    font-size: 0.85rem;
    line-height: 1.5;
    cursor: pointer;
}

.community-check input {
    margin-top: 3px;
    flex: 0 0 auto;
    accent-color: var(--gold, #c9a45c);
}

.community-check a {
    color: var(--gold, #c9a45c);
    text-decoration: underline;
}

.order-payment { margin-bottom: 20px; }

.order-payment__text {
    padding: 14px 16px;
    border: 1px solid rgba(201, 164, 92, 0.35);
    border-radius: 8px;
    background: rgba(201, 164, 92, 0.06);
    line-height: 1.6;
    white-space: normal;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #b5b5b5;
    font-family: 'Montserrat', sans-serif;
    margin-right: 6px;
    vertical-align: middle;
}

.badge--gold {
    border-color: rgba(201, 164, 92, 0.6);
    color: var(--gold);
}

.forum-meta {
    display: block;
    color: #777;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* --- Форум: список разделов --- */
.forum-categories,
.topic-list,
.forum-latest,
.post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.forum-category {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.forum-category:last-child { border-bottom: none; }

.forum-category__title {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    text-decoration: none;
}

.forum-category__title:hover { color: var(--gold-hover); }
.forum-category p { color: #858585; font-size: 0.86rem; margin-top: 4px; }

.forum-category__stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
    font-size: 0.8rem;
    color: #777;
    white-space: nowrap;
}

.forum-latest li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.forum-latest li:last-child { border-bottom: none; }
.forum-latest a { text-decoration: none; }
.forum-latest a:hover { color: var(--gold-hover); }

.community-actions form { margin: 0; }

/* --- Форум: темы и сообщения --- */
.topic-list li {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topic-list li:last-child { border-bottom: none; }

.topic-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
}

.topic-row a { text-decoration: none; font-size: 1rem; }
.topic-row a:hover { color: var(--gold-hover); }
.topic-stats { color: #777; font-size: 0.78rem; white-space: nowrap; }

.post {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.post:last-child { border-bottom: none; }

.post-author { text-align: center; }
.post-author strong { display: block; color: var(--gold); }
.post-author .avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    margin: 0 auto 8px;
    border: 1px solid rgba(201, 164, 92, 0.4);
    background: #15151a;
    object-fit: cover;
}
.post-author small { display: block; color: #777; margin-top: 4px; }

.post-body { min-width: 0; }

.post-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.78rem;
    color: #777;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.post-content {
    color: #d2d2d2;
    font-size: 0.95rem;
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.post-content p { margin-bottom: 10px; }
.post-content p:last-child { margin-bottom: 0; }
.post-content blockquote {
    border-left: 2px solid var(--gold);
    padding-left: 12px;
    color: #a9a9a9;
    margin: 10px 0;
}

.post--deleted .post-content { color: #6f6f6f; font-style: italic; }


/* --- Магазин --- */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.shop-card {
    display: flex;
    flex-direction: column;
    background: var(--panel-bg);
    border: 1px solid rgba(201, 164, 92, 0.18);
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.shop-card:hover {
    border-color: rgba(201, 164, 92, 0.55);
    transform: translateY(-2px);
}

.shop-card__image {
    display: block;
    aspect-ratio: 4 / 3;
    background: #14141a center/cover no-repeat;
}

.shop-card__body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; }

.shop-card__title {
    font-family: 'Cinzel', serif;
    color: var(--text-light);
    font-size: 0.98rem;
    margin-bottom: 6px;
}

.shop-card__desc {
    color: #848484;
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
}

.shop-price {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.shop-card__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.shop-stock { font-size: 0.75rem; color: #777; }
.shop-stock--out { color: #b25a5a; }

.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.product-image {
    width: 100%;
    border-radius: 4px;
    border: 1px solid rgba(201, 164, 92, 0.2);
    background: #14141a;
}

.product-description {
    color: #c4c4c4;
    line-height: 1.75;
    font-size: 0.95rem;
    margin: 16px 0;
}

.product-facts { margin: 18px 0; display: flex; gap: 22px; flex-wrap: wrap; }
.product-facts div { font-size: 0.82rem; color: #888; }
.product-facts strong { display: block; color: var(--text-light); font-size: 1rem; }


.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.shop-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-tabs a {
    padding: 6px 14px;
    border: 1px solid rgba(201, 164, 92, 0.3);
    border-radius: 2px;
    font-size: 0.8rem;
    text-decoration: none;
    color: #bdbdbd;
}
.shop-tabs a:hover,
.shop-tabs a.is-active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(201, 164, 92, 0.08);
}

.shop-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.shop-table th {
    text-align: left;
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8a8a;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.shop-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
}
.shop-table tfoot td { border-bottom: none; font-family: 'Cinzel', serif; }

.qty-form { display: flex; align-items: center; gap: 6px; }
.qty-form input[type="number"] {
    width: 64px;
    background: #121216;
    border: 1px solid rgba(201, 164, 92, 0.3);
    color: var(--text-light);
    padding: 6px 8px;
    border-radius: 3px;
    text-align: center;
}

.cart-summary {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.cart-total-label {
    font-family: 'Cinzel', serif;
    color: #9a9a9a;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cart-total-value { font-size: 1.4rem; }

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.order-status {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 2px;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(201, 164, 92, 0.5);
    color: var(--gold);
}
.order-status--done { border-color: rgba(95, 168, 95, 0.6); color: #9ad19a; }
.order-status--off { border-color: rgba(180, 70, 70, 0.6); color: #d99a9a; }

.order-items { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.order-items td { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.order-items td:last-child { text-align: right; white-space: nowrap; }


/* --- Пагинация --- */
.pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 22px 0 0;
    align-items: center;
}
.pagination a,
.pagination span {
    display: inline-block;
    min-width: 34px;
    text-align: center;
    padding: 6px 10px;
    border: 1px solid rgba(201, 164, 92, 0.28);
    border-radius: 2px;
    font-size: 0.82rem;
    color: #bdbdbd;
    text-decoration: none;
}
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .active span,
.pagination li.active > span {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--dark-bg);
    font-weight: 700;
}
.pagination .disabled span,
.pagination li.disabled > span { opacity: 0.4; }

/* partials/pagination.php использует классы .pager */
.pager {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
    background: none;
}
.pager__link {
    display: inline-block;
    min-width: 34px;
    text-align: center;
    padding: 6px 10px;
    border: 1px solid rgba(201, 164, 92, 0.28);
    border-radius: 2px;
    font-size: 0.82rem;
    color: #bdbdbd;
    text-decoration: none;
    background: transparent;
}
a.pager__link:hover { border-color: var(--gold); color: var(--gold); background: rgba(201, 164, 92, 0.08); }
.pager__link.is-active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--dark-bg);
    font-weight: 700;
}
.pager__link.is-disabled { opacity: 0.4; cursor: default; }
.pager__info { margin-left: 8px; color: #777; font-size: 0.8rem; border: none; padding: 0; }

.community-pager-legend { margin-top: 10px; color: #777; font-size: 0.8rem; }

/* --- Адаптив --- */
@media (max-width: 900px) {
    .community-grid,
    .checkout-grid,
    .product-layout { grid-template-columns: 1fr; }
    .post { grid-template-columns: 1fr; }
    .post-author { display: flex; align-items: center; gap: 10px; text-align: left; }
    .post-author .avatar { width: 40px; height: 40px; margin: 0; }
}

@media (max-width: 600px) {
    .container.community { padding-top: 24px; }
    .community-card { padding: 16px; }
    .forum-category { flex-direction: column; }
    .forum-category__stats { text-align: left; flex-direction: row; gap: 12px; }
    .topic-row { flex-direction: column; gap: 4px; }
    .topic-row__stats { align-items: flex-start; }
    .shop-table th:nth-child(2),
    .shop-table td:nth-child(2) { display: none; }
}


/* --- Соответствие разметке публичных шаблонов --- */
.shop-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.shop-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid rgba(201, 164, 92, 0.3);
    border-radius: 2px;
    color: #bdbdbd;
    font-size: 0.82rem;
    text-decoration: none;
}
.shop-chip span { color: #777; font-size: 0.75rem; }
.shop-chip:hover,
.shop-chip.is-active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(201, 164, 92, 0.08);
}

.shop-card__media {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    background: #14141a;
    overflow: hidden;
}
.shop-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%; height: 100%;
    min-height: 120px;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.3em;
    color: rgba(201, 164, 92, 0.35);
}
.shop-card__body h2 { margin: 8px 0; font-size: 1rem; }
.shop-card__body h2 a { color: var(--text-light); text-decoration: none; }
.shop-card__body h2 a:hover { color: var(--gold); }
.shop-card__body p { color: #848484; font-size: 0.82rem; line-height: 1.5; margin-bottom: 12px; }
.shop-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}
.shop-card__footer strong {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1rem;
    white-space: nowrap;
}
.shop-card__footer form { margin: 0; }
.shop-grid--compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.shop-product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin-bottom: 26px;
}
.shop-product__media {
    background: #14141a;
    border: 1px solid rgba(201, 164, 92, 0.2);
    border-radius: 4px;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.shop-product__media img { width: 100%; display: block; }
.shop-product__info h1 { margin: 10px 0; }
.shop-product__price {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1.6rem;
    margin: 6px 0;
}
.shop-product__stock { color: #8a8a8a; font-size: 0.85rem; margin-bottom: 16px; }
.shop-product__desc { color: #c4c4c4; line-height: 1.75; font-size: 0.95rem; margin: 18px 0; }
.shop-buy {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin: 16px 0;
}
.shop-buy label { display: block; font-size: 0.78rem; color: #8a8a8a; }
.shop-buy input[type="number"] {
    width: 76px;
    margin-top: 4px;
    background: #121216;
    border: 1px solid rgba(201, 164, 92, 0.3);
    color: var(--text-light);
    border-radius: 3px;
    padding: 9px 8px;
    text-align: center;
}


.cart-table, .checkout-list { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.cart-table th {
    text-align: left;
    font-family: 'Cinzel', serif;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8a8a;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.cart-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
}
.cart-table a { color: var(--text-light); text-decoration: none; }
.cart-table a:hover { color: var(--gold); }
.cart-qty { display: flex; align-items: center; gap: 6px; margin: 0; }
.cart-qty input[type="number"] {
    width: 64px;
    background: #121216;
    border: 1px solid rgba(201, 164, 92, 0.3);
    color: var(--text-light);
    border-radius: 3px;
    padding: 6px 8px;
    text-align: center;
}
.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.cart-actions form { margin: 0; }
.checkout-list { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.checkout-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #bdbdbd;
}
.checkout-list li strong { color: var(--text-light); white-space: nowrap; font-weight: 500; }
.checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(201, 164, 92, 0.3);
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1.15rem;
}

.status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 2px;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid rgba(201, 164, 92, 0.5);
    color: var(--gold);
    white-space: nowrap;
}
.status--delivered { border-color: rgba(95, 168, 95, 0.6); color: #9ad19a; }
.status--cancelled, .status--refunded { border-color: rgba(180, 70, 70, 0.6); color: #d99a9a; }
.status--paid { border-color: rgba(95, 140, 200, 0.6); color: #9abbdd; }

.delivery-list { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.delivery-list li { padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); color: #a9a9a9; }
.delivery-list li:last-child { border-bottom: none; }

.account-facts { display: flex; gap: 20px; flex-wrap: wrap; margin: 0 0 18px; padding: 0; list-style: none; }
.account-facts li { font-size: 0.82rem; color: #888; }
.account-facts strong { display: block; color: var(--text-light); font-size: 1rem; }

/* --- Фактическая BEM-разметка форума --- */
.post__author { text-align: center; }
.post__avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(201, 164, 92, 0.4);
    background: #15151a;
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    overflow: hidden;
}
.post__avatar img { width: 100%; height: 100%; object-fit: cover; }
.post__author strong { display: block; color: var(--gold); font-size: 0.92rem; }
.post__faction, .post__role { display: block; color: #777; font-size: 0.75rem; margin-top: 4px; }
.post__body { min-width: 0; }
.post__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.78rem;
    color: #777;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.post__text {
    color: #d2d2d2;
    font-size: 0.95rem;
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.post__text p { margin: 0 0 10px; }
.post__text p:last-child { margin-bottom: 0; }
.post__text blockquote {
    border-left: 2px solid var(--gold);
    padding-left: 12px;
    color: #a9a9a9;
    margin: 10px 0;
    font-style: italic;
}
.post__signature {
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    color: #7d7d7d;
    font-size: 0.82rem;
    font-style: italic;
}
.post__actions { display: flex; gap: 12px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.post__actions form { margin: 0; }
.post__link {
    background: none;
    border: none;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    color: #9a9a9a;
    text-decoration: none;
    cursor: pointer;
}
.post__link:hover { color: var(--gold); }
.post__link--danger:hover { color: #d99a9a; }

.post__permalink { color: inherit; text-decoration: none; }
.post__permalink:hover { color: var(--gold); }

/* Сообщение, открытое по прямой ссылке (#post-ID) */
.post:target {
    background: rgba(201, 164, 92, 0.07);
    box-shadow: inset 3px 0 0 var(--gold);
}

.topic-row__main { min-width: 0; }
.topic-row__title { display: block; text-decoration: none; font-size: 1rem; }
.topic-row__stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: #777;
    font-size: 0.78rem;
    white-space: nowrap;
}
.topic-row__stats a { color: #777; font-size: 0.78rem; }
.topic-row__stats a:hover { color: var(--gold); }


@media (max-width: 900px) {
    .shop-product { grid-template-columns: 1fr; }
    .post__author { display: flex; align-items: center; gap: 10px; text-align: left; }
    .post__avatar { width: 40px; height: 40px; margin: 0; font-size: 1rem; }
    .post__author strong { font-size: 0.85rem; }
}

@media (max-width: 600px) {
    .cart-table th:nth-child(2),
    .cart-table td:nth-child(2) { display: none; }
    .cart-table { font-size: 0.82rem; }
    .shop-filters { gap: 6px; }
    .shop-chip { padding: 5px 10px; font-size: 0.76rem; }
    .shop-buy { flex-direction: column; align-items: stretch; }
    .shop-buy .btn { width: 100%; }
}

/* --- Wiki --- */
.wiki-search {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.wiki-search input[type="search"] {
    flex: 1;
    min-width: 220px;
    background: #121216;
    border: 1px solid rgba(201, 164, 92, 0.3);
    border-radius: 3px;
    color: var(--text-light);
    padding: 10px 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
}
.wiki-search input[type="search"]:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(201, 164, 92, 0.15);
}
.wiki-layout { align-items: start; }
.wiki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}
.wiki-card {
    display: flex;
    flex-direction: column;
    background: var(--panel-bg);
    border: 1px solid rgba(201, 164, 92, 0.18);
    border-radius: 4px;
    padding: 18px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.wiki-card:hover {
    border-color: rgba(201, 164, 92, 0.55);
    transform: translateY(-2px);
}
.wiki-card h2 { margin: 10px 0 8px; font-size: 1.05rem; }
.wiki-card h2 a { color: var(--text-light); text-decoration: none; }
.wiki-card h2 a:hover { color: var(--gold); }
.wiki-card p { color: #8f8f8f; font-size: 0.84rem; line-height: 1.55; flex: 1; }
.wiki-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    color: #777;
    font-size: 0.78rem;
}
.wiki-card__meta a { text-decoration: none; }
.wiki-article__head { border-bottom: 1px solid rgba(201, 164, 92, 0.2); padding-bottom: 16px; margin-bottom: 20px; }
.wiki-article__head h1 { margin: 10px 0; }
.wiki-article__lead {
    color: #c9c9c9;
    font-size: 1.02rem;
    line-height: 1.7;
    border-left: 2px solid var(--gold);
    padding-left: 14px;
    margin-bottom: 22px;
}
.wiki-article__content { color: #d2d2d2; font-size: 0.96rem; line-height: 1.8; }
.wiki-article__content h2,
.wiki-article__content h3 { color: var(--text-light); margin: 24px 0 10px; }
.wiki-article__content p { margin-bottom: 12px; }
.wiki-article__content ul,
.wiki-article__content ol { margin: 0 0 14px 22px; }
.wiki-article__content li { margin-bottom: 6px; }
.wiki-article__content a { color: var(--gold); }
.wiki-article__content blockquote {
    border-left: 2px solid var(--gold);
    padding-left: 12px;
    color: #a9a9a9;
    margin: 14px 0;
}
.wiki-article__content img { max-width: 100%; height: auto; border-radius: 3px; }
.wiki-article__content td img { vertical-align: middle; }
.wiki-article__content th { color: var(--text-light); }
.wiki-article__content .lore-note { color: #9a9a9a; font-size: 0.88rem; }
.wiki-article__content .highlight { font-weight: 400; color: #9a9a9a; }
/* База знаний: широкие таблицы (бестиарий, предметы) прокручиваются внутри статьи. */
@media (max-width: 720px) {
    .wiki-article__content table { display: block; overflow-x: auto; }
    .wiki-article__content th,
    .wiki-article__content td { padding: 6px 8px; }
}
.wiki-article__content table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.wiki-article__content th,
.wiki-article__content td { border: 1px solid rgba(255, 255, 255, 0.12); padding: 8px 10px; text-align: left; }
.wiki-article__foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.wiki-related { margin-top: 26px; }
.wiki-related h2 { margin-bottom: 16px; }

/* --- История заказа --- */
.order-timeline {
    list-style: none;
    margin: 16px 0 0;
    padding: 0 0 0 18px;
    position: relative;
}
.order-timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: rgba(201, 164, 92, 0.3);
}
.order-timeline li { position: relative; padding: 0 0 16px 4px; }
.order-timeline li:last-child { padding-bottom: 0; }
.order-timeline__dot {
    position: absolute;
    left: -18px;
    top: 5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 164, 92, 0.12);
}
.order-timeline p { color: #9a9a9a; font-size: 0.85rem; margin-top: 4px; }

.community-card__subhead { margin-top: 22px; }

@media (max-width: 600px) {
    .wiki-grid { grid-template-columns: 1fr; }
    .wiki-search .btn { width: 100%; }
}

/* ---------- Форум: закрытые темы, лайки, рейтинг игроков ---------- */
.badge--lock { border-color: rgba(154, 130, 220, 0.6); color: #b9a6ec; }
.community-check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; color: #b5b5b5; cursor: pointer; }
.community-check input { margin-top: 3px; accent-color: var(--gold); }

.like-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1px 10px;
    font-size: 0.8rem;
    color: #9a9a9a;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}
.like-btn:hover { color: #e48a9a; border-color: rgba(228, 138, 154, 0.5); }
.like-btn.is-liked { color: #e48a9a; border-color: rgba(228, 138, 154, 0.7); }
.like-btn.is-static { cursor: default; }
.like-btn.is-static:hover { color: #9a9a9a; border-color: rgba(255, 255, 255, 0.15); }
.like-form { display: inline; }

.post__rating { display: block; margin-top: 6px; font-size: 0.78rem; color: #9a9a9a; text-decoration: none; }
.post__rating:hover { color: var(--gold); }
.post__rating.is-plus, .is-plus { color: #8fcf8f; }
.post__rating.is-minus, .is-minus { color: #e08a7c; }
.post__rate { display: flex; gap: 6px; justify-content: center; margin-top: 4px; position: relative; }
.post__rate form { margin: 0; }
.rate-btn {
    display: inline-block;
    width: 24px; height: 22px; line-height: 20px;
    padding: 0;
    text-align: center;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    color: #9a9a9a;
    cursor: pointer;
    list-style: none;
    font-size: 0.9rem;
}
.rate-btn::-webkit-details-marker { display: none; }
.rate-btn--plus:hover { color: #8fcf8f; border-color: rgba(143, 207, 143, 0.6); }
.rate-btn--minus:hover { color: #e08a7c; border-color: rgba(224, 138, 124, 0.6); }
.rate-minus { position: relative; }
.rate-minus form {
    position: absolute; z-index: 5; top: 26px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; padding: 8px; width: 240px;
    background: #1c1c1c; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 4px;
}
.rate-minus input[type="text"], .rate-box input[type="text"] {
    flex: 1; min-width: 0; padding: 4px 8px; background: #111; color: #ddd;
    border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 3px; font: inherit; font-size: 0.85rem;
}

.topic-members { margin-top: 24px; }
.topic-members__list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.topic-members__list li { display: flex; gap: 8px; align-items: center; }
.topic-members__list form { margin: 0; }
.topic-members__invite { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.topic-members__invite .community-field { flex: 1; min-width: 220px; margin: 0; }

.forum-rating-link { margin: 0 0 16px; }
.forum-rating-link a { color: var(--gold); text-decoration: none; }
.rating-list { list-style: none; margin: 0; padding: 0; }
.rating-row { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.rating-row__place { width: 28px; color: #777; }
.rating-row__name { color: #ddd; text-decoration: none; font-weight: 600; }
.rating-row__name:hover { color: var(--gold); }
.rating-row .forum-meta { display: inline; }
.rating-row__value { margin-left: auto; }
.rate-box__forms { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.rate-box__forms form { display: flex; gap: 6px; align-items: center; margin: 0; }
.rating-history { list-style: none; margin: 0; padding: 0; }
.rating-history li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.rating-history .forum-meta { display: inline; }
.rating-history form { margin: 0 0 0 auto; }
.rating-history__reason { color: #b5b5b5; flex-basis: 100%; }
@media (max-width: 900px) {
    /* Автор сообщения в строку: рейтинг и кнопки переносятся, а не уезжают за край. */
    .post__author { flex-wrap: wrap; }
    .post__rating { margin-top: 0; }
    .post__rate { margin-top: 0; }
}
@media (max-width: 640px) {
    .rate-minus form { left: auto; right: 0; transform: none; width: 210px; }
    .rating-row__value { margin-left: 0; }
}
