/* ==========================================================
   Rexiopedia – warstwa "odnowy" (ładowana jako ostatni arkusz)
   Jeden zestaw kolorów i komponentów dla wszystkich podstron.
   ========================================================== */

:root {
    --rx-surface: rgba(17, 22, 35, 0.94);
    --rx-surface-2: rgba(27, 34, 52, 0.94);
    --rx-surface-3: rgba(38, 47, 70, 0.94);
    --rx-line: rgba(140, 160, 210, 0.16);
    --rx-line-strong: rgba(140, 160, 210, 0.3);
    --rx-text: #e7eaf3;
    --rx-muted: #98a2b8;
    --rx-accent: #5b9bff;
    --rx-accent-strong: #2f6fed;
    --rx-gold: #f2b84b;
    --rx-radius: 14px;
    --rx-radius-sm: 10px;
}

/* ---------- Podstawa ---------- */

body {
    color: var(--rx-text);
}

/* przyciemnienie tła, żeby treść była czytelna bez poświat */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(7, 10, 18, 0.55) 0%, rgba(7, 10, 18, 0.9) 70%);
    pointer-events: none;
}

body main.container {
    max-width: 1200px;
    margin-top: 1.75rem !important;
}

body main a {
    color: var(--rx-accent);
}

body main h1 {
    font-size: clamp(1.6rem, 3vw, 2.25rem) !important;
    font-weight: 700 !important;
    color: #fff !important;
    text-shadow: none !important;
    letter-spacing: -0.01em;
    margin-bottom: 0;
}

body main h2,
body main h3,
body main h4,
body main h5 {
    text-shadow: none !important;
}

body .text-muted {
    color: var(--rx-muted) !important;
}

/* okruszki */
body main .breadcrumb {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.875rem;
    backdrop-filter: none !important;
}

body main nav[aria-label="breadcrumb"] {
    margin-bottom: 0.75rem !important;
}

body main .breadcrumb-item,
body main .breadcrumb-item.active {
    color: var(--rx-muted) !important;
    text-shadow: none !important;
}

body main .breadcrumb-item a {
    color: var(--rx-muted) !important;
    text-decoration: none !important;
    text-shadow: none !important;
}

body main .breadcrumb-item a:hover {
    color: var(--rx-accent) !important;
}

body main .breadcrumb-item + .breadcrumb-item::before {
    color: var(--rx-muted) !important;
    content: '›' !important;
}

/* ---------- Karty, przyciski, formularze ---------- */

body .card {
    background: var(--rx-surface) !important;
    border: 1px solid var(--rx-line) !important;
    border-radius: var(--rx-radius) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: var(--rx-text);
}

body .card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--rx-line) !important;
    padding: 0.9rem 1.15rem !important;
    color: #fff !important;
    box-shadow: none !important;
}

body .card-header h2,
body .card-header h3 {
    font-size: 1rem !important;
    font-weight: 700;
    letter-spacing: 0.01em;
}

body .btn {
    border-radius: var(--rx-radius-sm);
    box-shadow: none !important;
    text-shadow: none !important;
}

body .btn-primary {
    background: var(--rx-accent-strong) !important;
    border-color: var(--rx-accent-strong) !important;
    color: #fff !important;
}

body .btn-primary:hover,
body .btn-primary:focus {
    background: #3f7df5 !important;
    border-color: #3f7df5 !important;
}

body .btn-outline-secondary,
body .btn-outline-light {
    border-color: var(--rx-line-strong) !important;
    color: var(--rx-text) !important;
    background: transparent !important;
}

body .btn-outline-secondary:hover,
body .btn-outline-light:hover {
    background: var(--rx-surface-3) !important;
    color: #fff !important;
}

body .badge {
    box-shadow: none !important;
    text-shadow: none !important;
    font-weight: 600;
    letter-spacing: 0.01em;
}

body .badge.bg-primary {
    background: rgba(91, 155, 255, 0.16) !important;
    color: #a9c8ff !important;
    border: 1px solid rgba(91, 155, 255, 0.25);
}

body .badge.bg-secondary {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #cfd5e4 !important;
    border: 1px solid var(--rx-line);
}

body .badge.bg-success {
    background: rgba(74, 201, 138, 0.14) !important;
    color: #8be0b5 !important;
    border: 1px solid rgba(74, 201, 138, 0.25);
}

body .badge.bg-info {
    background: rgba(242, 184, 75, 0.14) !important;
    color: #f5cf85 !important;
    border: 1px solid rgba(242, 184, 75, 0.28);
}

body .form-control,
body .form-select {
    background-color: rgba(9, 12, 21, 0.75) !important;
    border: 1px solid var(--rx-line-strong) !important;
    color: var(--rx-text) !important;
    border-radius: var(--rx-radius-sm) !important;
    box-shadow: none !important;
}

body .form-control::placeholder {
    color: #7c869d;
}

body .form-control:focus,
body .form-select:focus {
    border-color: var(--rx-accent) !important;
    box-shadow: 0 0 0 3px rgba(91, 155, 255, 0.2) !important;
}

body .form-label {
    color: var(--rx-muted) !important;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-shadow: none !important;
}

body .list-group-item {
    background: transparent !important;
    border-color: var(--rx-line) !important;
    color: var(--rx-text) !important;
}

body a.list-group-item:hover {
    background: var(--rx-surface-2) !important;
    color: #fff !important;
}

body .alert-info {
    background: var(--rx-surface-2);
    border-color: var(--rx-line);
    color: var(--rx-text);
}

:focus-visible {
    outline: 2px solid var(--rx-accent);
    outline-offset: 2px;
}

.rx-hide {
    display: none !important;
}

/* ---------- Górny pasek ---------- */

body .rx-navbar {
    background: rgba(10, 13, 22, 0.92) !important;
    border-bottom: 1px solid var(--rx-line) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.55rem 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
}

body .rx-navbar > .container {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.5rem 1rem;
}

body .rx-navbar .navbar-brand {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
    margin: 0 !important;
    padding: 0.2rem 0 !important;
    position: static !important;
    transform: none !important;
}

body .rx-navbar .navbar-toggler {
    margin-left: auto;
    border: 1px solid var(--rx-line-strong);
    padding: 0.3rem 0.55rem;
    box-shadow: none !important;
}

body .rx-nav-search {
    position: relative;
    flex: 1 1 14rem;
    max-width: 22rem;
    margin: 0;
}

body .rx-nav-search > .bi-search {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rx-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

body .rx-nav-search input {
    width: 100%;
    height: 2.35rem;
    padding: 0 0.9rem 0 2.2rem;
    border-radius: 999px;
    border: 1px solid var(--rx-line-strong);
    background: rgba(255, 255, 255, 0.06);
    color: var(--rx-text);
    font-size: 0.9rem;
    outline: none;
}

body .rx-nav-search input::placeholder {
    color: #8791a8;
}

body .rx-nav-search input:focus {
    border-color: var(--rx-accent);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 3px rgba(91, 155, 255, 0.18);
}

body .rx-navbar .navbar-collapse {
    flex-grow: 1;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto;
}

body .rx-navbar .navbar-nav {
    gap: 0.15rem;
    background: none !important;
    border: 0 !important;
    padding: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    width: auto !important;
    flex-direction: row;
}

body .rx-navbar .nav-link {
    padding: 0.4rem 0.7rem !important;
    border-radius: 8px;
    font-size: 0.92rem;
    color: #c9d0e0 !important;
    white-space: nowrap;
    background: none;
    text-shadow: none !important;
}

body .rx-navbar .nav-link:hover,
body .rx-navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.07) !important;
}

body .rx-navbar .nav-link.active {
    box-shadow: inset 0 -2px 0 var(--rx-accent);
}

body .rx-navbar .rx-btn-register {
    background: var(--rx-accent-strong) !important;
    color: #fff !important;
}

body .rx-navbar .rx-btn-register:hover {
    background: #3f7df5 !important;
}

body .dropdown-menu {
    background: #141a29 !important;
    border: 1px solid var(--rx-line-strong) !important;
    border-radius: var(--rx-radius-sm) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45) !important;
    padding: 0.35rem !important;
}

body .dropdown-item {
    border-radius: 7px;
    padding: 0.45rem 0.75rem !important;
    color: var(--rx-text) !important;
    font-size: 0.92rem;
}

body .dropdown-item:hover,
body .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

/* wybór języka w menu */
body .rx-lang .dropdown-item.language-flag {
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
    background: none;
}

body .rx-lang .dropdown-item.language-flag img {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

body .rx-lang .dropdown-item.language-flag.active-flag {
    background: rgba(91, 155, 255, 0.16) !important;
    color: #fff !important;
}

/* wyniki podpowiedzi wyszukiwarki */
body #search-suggestions {
    background: #141a29 !important;
    border: 1px solid var(--rx-line-strong) !important;
    border-radius: var(--rx-radius-sm) !important;
    overflow: hidden auto;
    text-align: left;
}

body #search-suggestions .list-group-item {
    border-left: 0;
    border-right: 0;
    padding: 0.6rem 0.9rem;
}

body #search-suggestions h6 {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--rx-text);
}

/* ---------- Tabele list (przedmioty, potwory, NPC, taski) ---------- */

body .rx-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

body .rx-page-head p {
    margin: 0.35rem 0 0;
    color: var(--rx-muted);
    font-size: 0.95rem;
}

body .rx-table-wrap {
    background: var(--rx-surface) !important;
    border: 1px solid var(--rx-line) !important;
    border-radius: var(--rx-radius) !important;
    box-shadow: none !important;
    overflow: hidden;
    margin-bottom: 1.5rem;
    padding: 0 !important;
}

body table.rx-table {
    width: 100% !important;
    margin: 0 !important;
    border-collapse: collapse !important;
    background: none !important;
    color: var(--rx-text) !important;
    border: 0 !important;
    box-shadow: none !important;
    table-layout: auto !important;
    --bs-table-bg: transparent;
    --bs-table-hover-bg: transparent;
    --bs-table-color: var(--rx-text);
}

body table.rx-table thead th {
    background: rgba(255, 255, 255, 0.035) !important;
    color: var(--rx-muted) !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.7rem 0.9rem !important;
    border: 0 !important;
    border-bottom: 1px solid var(--rx-line) !important;
    white-space: nowrap;
    text-shadow: none !important;
    box-shadow: none !important;
    vertical-align: middle !important;
}

body table.rx-table thead th::after,
body table.rx-table td::after {
    display: none !important;
}

body table.rx-table tbody tr {
    background: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background-color 0.15s ease;
}

body table.rx-table tbody tr:hover {
    background: rgba(91, 155, 255, 0.07) !important;
}

body table.rx-table tbody td {
    background: none !important;
    color: var(--rx-text) !important;
    padding: 0.55rem 0.9rem !important;
    border: 0 !important;
    border-bottom: 1px solid var(--rx-line) !important;
    vertical-align: middle !important;
    font-size: 0.93rem;
    line-height: 1.45;
    text-shadow: none !important;
    box-shadow: none !important;
    height: auto !important;
    width: auto;
    min-width: 0 !important;
    max-width: none !important;
}

body table.rx-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

body table.rx-table td img {
    max-height: 40px !important;
    max-width: 48px !important;
    width: auto !important;
    height: auto !important;
    border: 0 !important;
    background: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    image-rendering: pixelated;
    display: block;
    margin: 0 auto;
}

body table.rx-table .rx-cell-img {
    width: 64px !important;
    text-align: center;
}

body table.rx-table .rx-cell-name {
    font-weight: 600;
    color: #fff !important;
    white-space: nowrap;
}

body table.rx-table .rx-cell-muted {
    color: var(--rx-muted) !important;
}

body table.rx-table .rx-cell-num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body table.rx-table .rx-cell-id {
    color: var(--rx-muted) !important;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    font-weight: 400 !important;
}

body table.rx-table .description-content p {
    margin: 0;
}

body table.rx-table code,
body .rx-code {
    background: rgba(255, 255, 255, 0.07);
    color: #c9dcff;
    border-radius: 6px;
    padding: 0.15rem 0.45rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* sortowanie kolumn */
body table.rx-table th[data-sort] {
    cursor: pointer;
    user-select: none;
}

body table.rx-table th[data-sort]:hover {
    color: #fff !important;
}

body table.rx-table th[data-sort] .rx-sort-ico {
    display: inline-block;
    margin-left: 0.3rem;
    opacity: 0.45;
    font-size: 0.7rem;
}

body table.rx-table th[aria-sort] .rx-sort-ico {
    opacity: 1;
    color: var(--rx-accent);
}

/* porównywanie przedmiotów */
body table.rx-table .rx-cell-check {
    width: 40px !important;
    text-align: center;
}

body .rx-table .form-check-input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    background-color: rgba(255, 255, 255, 0.06) !important;
    background-image: none;
    border: 1px solid var(--rx-line-strong) !important;
    box-shadow: none !important;
    cursor: pointer;
}

body .rx-table .form-check-input:checked {
    background-color: var(--rx-accent-strong) !important;
    border-color: var(--rx-accent-strong) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
}

/* ---------- Przedmioty: pasek narzędzi i zakładki typów ---------- */

body .rx-toolbar {
    display: grid;
    grid-template-columns: minmax(12rem, 1.4fr) minmax(9rem, 1fr) minmax(9rem, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
    padding: 1rem;
    background: var(--rx-surface);
    border: 1px solid var(--rx-line);
    border-radius: var(--rx-radius);
    margin-bottom: 0.75rem;
}

body .rx-toolbar label {
    display: block;
    margin-bottom: 0.3rem;
}

body .rx-toolbar-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

body .rx-toolbar-actions .btn {
    white-space: nowrap;
    font-size: 0.9rem;
    padding: 0.45rem 0.8rem;
}

body .rx-search-field {
    position: relative;
}

body .rx-search-field .bi-search {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rx-muted);
    pointer-events: none;
}

body .rx-search-field .form-control {
    padding-left: 2.3rem;
}

body .rx-tabs {
    position: sticky;
    top: 3.6rem;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.55rem;
    margin-bottom: 1.25rem;
    background: rgba(10, 13, 22, 0.94);
    border: 1px solid var(--rx-line);
    border-radius: var(--rx-radius);
    scrollbar-width: thin;
}

body .rx-tabs a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--rx-line);
    color: #c9d0e0;
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
}

body .rx-tabs a span {
    color: var(--rx-muted);
    font-size: 0.75rem;
}

body .rx-tabs a:hover,
body .rx-tabs a.active {
    background: rgba(91, 155, 255, 0.16);
    border-color: rgba(91, 155, 255, 0.4);
    color: #fff;
}

body .rx-tabs a.rx-empty {
    opacity: 0.35;
    pointer-events: none;
}

body .item-type-group {
    scroll-margin-top: 7.5rem;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 1.75rem !important;
}

body .item-type-group > h3 {
    font-size: 1.15rem !important;
    font-weight: 700;
    color: #fff !important;
    margin: 0 0 0.6rem !important;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

body .item-type-group > h3 small {
    color: var(--rx-muted);
    font-size: 0.8rem;
    font-weight: 400;
}

body .rx-no-results {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--rx-muted);
    border: 1px dashed var(--rx-line-strong);
    border-radius: var(--rx-radius);
}

body #scrollToTop {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1030;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--rx-line-strong);
    background: rgba(17, 22, 35, 0.95);
    color: var(--rx-text);
    font-size: 0.85rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

body #scrollToTop:hover {
    background: var(--rx-accent-strong);
    color: #fff;
}

body .modal-content {
    background: #121826 !important;
    border: 1px solid var(--rx-line-strong) !important;
    border-radius: var(--rx-radius) !important;
    color: var(--rx-text) !important;
}

body .modal-header,
body .modal-footer {
    border-color: var(--rx-line) !important;
}

body #comparisonModal th:first-child,
body #comparisonModal td:first-child {
    width: 120px;
}

body #comparisonModal th,
body #comparisonModal td {
    white-space: normal;
    overflow-wrap: break-word;
}

/* ---------- Strona główna ---------- */

body .rx-hero {
    text-align: center;
    padding: 3.25rem 2rem 2.75rem;
    margin-bottom: 1.5rem;
    background:
        radial-gradient(ellipse 75% 60% at 50% 0%, rgba(91, 155, 255, 0.2), transparent 70%),
        rgba(13, 17, 28, 0.55);
    border: 1px solid var(--rx-line);
    border-radius: 1.25rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

body .rx-hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem) !important;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

body .rx-hero h1 span {
    color: var(--rx-accent);
}

body .rx-hero > p {
    color: #b8c0d4;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    margin: 0 auto 1.6rem;
    max-width: 38rem;
}

body .rx-search-lg {
    position: relative;
    max-width: 40rem;
    margin: 0 auto;
}

body .rx-search-lg > .bi-search {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rx-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

body .rx-search-lg input {
    width: 100%;
    height: 3.5rem;
    padding: 0 7.5rem 0 3.1rem;
    border-radius: 999px;
    border: 1px solid var(--rx-line-strong);
    background: rgba(13, 17, 28, 0.92);
    color: #fff;
    font-size: 1.05rem;
    outline: none;
}

body .rx-search-lg input::placeholder {
    color: #8791a8;
}

body .rx-search-lg input:focus {
    border-color: var(--rx-accent);
    box-shadow: 0 0 0 4px rgba(91, 155, 255, 0.2);
}

body .rx-search-lg button {
    position: absolute;
    right: 0.4rem;
    top: 0.4rem;
    bottom: 0.4rem;
    padding: 0 1.3rem;
    border: 0;
    border-radius: 999px;
    background: var(--rx-accent-strong);
    color: #fff;
    font-weight: 600;
}

body .rx-search-lg button:hover {
    background: #3f7df5;
}

body .rx-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.1rem;
    font-size: 0.88rem;
    color: var(--rx-muted);
}

body .rx-chips a {
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--rx-line-strong);
    background: rgba(13, 17, 28, 0.7);
    color: #d5dbea;
    text-decoration: none;
}

body .rx-chips a:hover {
    border-color: var(--rx-accent);
    color: #fff;
}

body .rx-advent {
    display: inline-block;
    margin-bottom: 1.25rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(242, 184, 75, 0.5);
    background: rgba(242, 184, 75, 0.1);
    color: var(--rx-gold) !important;
    font-weight: 600;
    text-decoration: none;
}

body .rx-section-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--rx-muted);
    margin: 0 0 0.85rem;
}

body .rx-cat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.85rem;
    margin-bottom: 2rem;
}

body .rx-cat {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    background: var(--rx-surface);
    border: 1px solid var(--rx-line);
    border-radius: var(--rx-radius);
    color: var(--rx-text);
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

body .rx-cat:hover {
    border-color: rgba(91, 155, 255, 0.55);
    background: var(--rx-surface-2);
    transform: translateY(-2px);
    color: #fff;
}

body .rx-cat-ico {
    flex: 0 0 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body .rx-cat-ico img {
    max-width: 44px;
    max-height: 44px;
    image-rendering: pixelated;
}

body .rx-cat-ico i {
    font-size: 1.7rem;
    color: var(--rx-accent);
}

body .rx-cat-body {
    min-width: 0;
}

body .rx-cat-name {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    font-weight: 700;
    color: #fff;
}

body .rx-cat-name small {
    color: var(--rx-muted);
    font-weight: 400;
    font-size: 0.78rem;
}

body .rx-cat-desc {
    display: block;
    color: var(--rx-muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

/* Kafelki artykułów i podkategorii na stronach kategorii — ten sam wygląd co .rx-cat */
.rx-article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.85rem;
    margin-bottom: 2rem;
}

/* Średnia wersja kafelka — artykuły na stronach kategorii */
body .rx-cat.rx-cat-md {
    padding: 1.15rem 1.25rem;
    gap: 1rem;
}

body .rx-cat.rx-cat-md .rx-cat-ico {
    flex: 0 0 58px;
    height: 58px;
}

body .rx-cat.rx-cat-md .rx-cat-ico img {
    max-width: 58px;
    max-height: 58px;
}

body .rx-cat.rx-cat-md .rx-cat-ico i {
    font-size: 2rem;
}

body .rx-cat.rx-cat-md .rx-cat-name {
    font-size: 1.1rem;
}

body .rx-cat.rx-cat-md .rx-cat-desc {
    font-size: 0.85rem;
}

.rx-article-tile {
    display: flex;
    flex-direction: column;
}

.rx-article-tile > .rx-cat {
    flex: 1 1 auto;
}

.rx-icon-btn {
    align-self: flex-end;
    margin-top: 0.4rem;
    padding: 0.1rem 0.5rem;
    line-height: 1.2;
}

.rx-subcat-admin {
    align-self: flex-end;
    margin-top: 0.4rem;
}

@media (max-width: 576px) {
    .rx-article-grid {
        grid-template-columns: 1fr;
    }
}

/* Większa wersja kafelka — podkategorie */
body .rx-cat.rx-cat-lg {
    padding: 1.6rem 1.75rem;
    gap: 1.25rem;
}

body .rx-cat.rx-cat-lg .rx-cat-ico {
    flex: 0 0 96px;
    height: 96px;
}

body .rx-cat.rx-cat-lg .rx-cat-ico img {
    max-width: 96px;
    max-height: 96px;
}

body .rx-cat.rx-cat-lg .rx-cat-ico i {
    font-size: 3rem;
}

body .rx-cat.rx-cat-lg .rx-cat-name {
    font-size: 1.5rem;
}

body .rx-cat.rx-cat-lg .rx-cat-name small {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

body .rx-cat.rx-cat-lg .rx-cat-desc {
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

#subcategoriesContainer.rx-article-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

@media (min-width: 992px) {
    #subcategoriesContainer.rx-article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    body .rx-cat.rx-cat-lg {
        padding: 1.1rem 1.2rem;
    }

    body .rx-cat.rx-cat-lg .rx-cat-ico {
        flex: 0 0 64px;
        height: 64px;
    }

    body .rx-cat.rx-cat-lg .rx-cat-ico img {
        max-width: 64px;
        max-height: 64px;
    }

    body .rx-cat.rx-cat-lg .rx-cat-name {
        font-size: 1.25rem;
    }
}

body .rx-start-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-bottom: 2rem;
}

body .rx-start {
    display: block;
    padding: 1.1rem 1.15rem;
    background: linear-gradient(135deg, rgba(47, 111, 237, 0.2), rgba(17, 22, 35, 0.94) 60%);
    border: 1px solid var(--rx-line);
    border-radius: var(--rx-radius);
    color: var(--rx-text);
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

body .rx-start:hover {
    border-color: rgba(91, 155, 255, 0.55);
    transform: translateY(-2px);
    color: #fff;
}

body .rx-start strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

body .rx-start strong i {
    color: var(--rx-accent);
}

body .rx-start span {
    color: var(--rx-muted);
    font-size: 0.88rem;
}

body .rx-panels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-bottom: 2rem;
    align-items: start;
}

body .rx-panels .card {
    margin: 0 !important;
    height: 100%;
}

body .rx-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1.15rem;
    border-bottom: 1px solid var(--rx-line);
    color: var(--rx-text);
    text-decoration: none;
    font-size: 0.93rem;
}

body .rx-list a:last-child {
    border-bottom: 0;
}

body .rx-list a:hover {
    background: var(--rx-surface-2);
    color: #fff;
}

body .rx-list a > span:first-child {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

body .rx-list .rx-rank {
    flex: 0 0 1.4rem;
    color: var(--rx-muted);
    font-variant-numeric: tabular-nums;
    font-size: 0.8rem;
}

body .rx-list .rx-dot {
    flex: 0 0 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ac98a;
}

body .discord-widget,
body .discord-widget * {
    box-shadow: none !important;
}

body .btn-discord {
    background: #5865f2 !important;
    color: #fff !important;
    border: 0 !important;
}

/* film */
body .rx-video {
    position: relative;
    overflow: hidden;
    border-radius: var(--rx-radius);
    border: 1px solid var(--rx-line);
    background: #000;
    margin-bottom: 2rem;
}

body .rx-video video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body .rx-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border: 0;
    background: linear-gradient(to top, rgba(7, 10, 18, 0.8), rgba(7, 10, 18, 0.25));
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
}

body .rx-video-play i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background: var(--rx-accent-strong);
    font-size: 2.2rem;
    padding-left: 0.25rem;
    transition: transform 0.15s ease;
}

body .rx-video-play:hover i {
    transform: scale(1.08);
}

/* ---------- Przewodniki / karty artykułów ---------- */

body .subcategory-card,
body .article-card {
    box-shadow: none !important;
}

body .article-card:hover,
body .subcategory-card:hover {
    border-color: rgba(91, 155, 255, 0.55) !important;
}

body .article-card .text-dark,
body .article-card .article-title span {
    color: #fff !important;
}

/* ---------- Artykuł ---------- */

body .rx-article-head {
    margin-bottom: 1.25rem;
}

body .rx-article-head .rx-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

body .rx-article {
    max-width: 980px;
    margin: 0 auto;
}

body .rx-article .article-content {
    background: var(--rx-surface) !important;
    border: 1px solid var(--rx-line) !important;
    border-radius: var(--rx-radius) !important;
    box-shadow: none !important;
    padding: clamp(1rem, 3vw, 2rem) !important;
    margin: 0 0 1.5rem !important;
    overflow-x: auto;
    line-height: 1.6;
}

body .rx-article .article-content img {
    max-width: 100%;
    height: auto;
}

/* ---------- Kontakt ---------- */

body .rx-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-bottom: 1rem;
}

body .rx-contact {
    display: block;
    padding: 1.25rem;
    background: var(--rx-surface);
    border: 1px solid var(--rx-line);
    border-radius: var(--rx-radius);
    color: var(--rx-text);
    text-decoration: none;
}

body a.rx-contact:hover {
    border-color: rgba(91, 155, 255, 0.55);
    color: #fff;
}

body .rx-contact i {
    font-size: 1.6rem;
    color: var(--rx-accent);
}

body .rx-contact strong {
    display: block;
    margin: 0.5rem 0 0.15rem;
    color: #fff;
    font-size: 1.05rem;
}

body .rx-contact span {
    color: var(--rx-muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

body .rx-staff {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

body .rx-staff span {
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--rx-line);
    color: var(--rx-text);
    font-size: 0.88rem;
}

body .rx-staff span b {
    color: var(--rx-gold);
    font-weight: 600;
}

/* ---------- Stopka ---------- */

body .footer {
    background: rgba(8, 11, 19, 0.94) !important;
    border-top: 1px solid var(--rx-line) !important;
    color: var(--rx-muted);
    padding: 2.25rem 0 1.5rem !important;
    margin-top: 3rem !important;
    box-shadow: none !important;
}

body .footer h5 {
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
}

body .footer p {
    font-size: 0.92rem;
}

body .footer a {
    color: #c9d0e0 !important;
}

body .footer a:hover {
    color: #fff !important;
}

body .footer hr {
    border-color: var(--rx-line);
    opacity: 1;
}

/* ---------- Tablet ---------- */

@media (max-width: 1199.98px) {
    body .rx-cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991.98px) {
    body .rx-nav-search {
        order: 3;
        flex: 1 1 100%;
        max-width: none;
    }

    body .rx-navbar .navbar-collapse {
        order: 4;
        flex-basis: 100%;
    }

    body .rx-navbar .navbar-nav {
        flex-direction: column;
        align-items: stretch !important;
        width: 100% !important;
        padding: 0.35rem 0 !important;
    }

    body .rx-navbar .rx-nav-right {
        border-top: 1px solid var(--rx-line) !important;
        margin-top: 0.25rem !important;
        padding-top: 0.5rem !important;
    }

    body .rx-navbar .nav-link {
        padding: 0.6rem 0.75rem !important;
        text-align: left;
    }

    body .rx-navbar .dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100%;
        box-shadow: none !important;
    }

    body .rx-panels {
        grid-template-columns: 1fr;
    }

    body .rx-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    body .rx-toolbar > .rx-search-wrap,
    body .rx-toolbar > .rx-toolbar-actions {
        grid-column: 1 / -1;
    }
}

/* ---------- Telefon: tabele jako karty ---------- */

@media (max-width: 767.98px) {
    body main.container {
        margin-top: 1.1rem !important;
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    body .rx-hero {
        padding: 1.75rem 1rem;
    }

    body .rx-search-lg input {
        height: 3.1rem;
        padding-right: 3.6rem;
        font-size: 1rem;
    }

    body .rx-search-lg button {
        padding: 0 0.95rem;
    }

    body .rx-search-lg button span {
        display: none;
    }

    body .rx-cat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    body .rx-cat {
        padding: 0.75rem;
        gap: 0.65rem;
    }

    body .rx-cat-ico {
        flex-basis: 36px;
        height: 36px;
    }

    body .rx-cat-ico img {
        max-width: 36px;
        max-height: 36px;
    }

    body .rx-cat-desc {
        display: none;
    }

    body .rx-cat-name {
        flex-direction: column;
        gap: 0;
    }

    body .rx-start-grid,
    body .rx-contact-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    body .rx-tabs {
        position: static;
        margin-left: -0.85rem;
        margin-right: -0.85rem;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    body .item-type-group {
        scroll-margin-top: 1rem;
    }

    body .rx-toolbar-actions .btn {
        flex: 1 1 auto;
    }

    body .rx-table-wrap {
        overflow: visible;
    }

    body table.rx-table,
    body table.rx-table tbody {
        display: block !important;
        width: 100% !important;
    }

    body table.rx-table thead {
        display: none !important;
    }

    body table.rx-table tbody tr {
        display: grid !important;
        gap: 0.2rem 0.75rem;
        align-items: center;
        padding: 0.8rem 0.9rem;
        border-bottom: 1px solid var(--rx-line);
        width: 100% !important;
    }

    body table.rx-table tbody tr:last-child {
        border-bottom: 0;
    }

    body table.rx-table tbody td {
        display: block !important;
        padding: 0 !important;
        border: 0 !important;
        width: auto !important;
        text-align: left !important;
        white-space: normal !important;
        font-size: 0.9rem;
    }

    body table.rx-table tbody td:empty {
        display: none !important;
    }

    body table.rx-table td[data-label]::before {
        content: attr(data-label) ': ';
        color: var(--rx-muted);
        font-size: 0.78rem;
    }

    body table.rx-table .rx-cell-img {
        grid-area: img;
        width: 44px !important;
        align-self: start;
    }

    body table.rx-table .rx-cell-name {
        grid-area: name;
        white-space: normal;
        font-size: 1rem;
    }

    body table.rx-table .rx-cell-actions {
        grid-area: act;
        margin-top: 0.4rem;
    }

    /* przedmioty */
    body table.rx-table--items tbody tr {
        grid-template-columns: 44px auto 1fr auto;
        grid-template-areas:
            "img name name check"
            "img prof lvl  id"
            "desc desc desc desc"
            "src  src  src  src"
            "act  act  act  act";
    }

    body table.rx-table--items .rx-cell-check { grid-area: check; width: auto !important; justify-self: end; }
    body table.rx-table--items .rx-cell-id { grid-area: id; justify-self: end; }
    body table.rx-table--items .rx-cell-id::before { content: '#'; }
    body table.rx-table--items .rx-cell-prof { grid-area: prof; }
    body table.rx-table--items .rx-cell-lvl { grid-area: lvl; }
    body table.rx-table--items .rx-cell-desc { grid-area: desc; margin-top: 0.35rem; color: #cfd5e4 !important; }
    body table.rx-table--items .rx-cell-src { grid-area: src; color: var(--rx-muted) !important; }
    body table.rx-table--items .rx-cell-src .description-content { display: inline; }
    body table.rx-table--items .rx-cell-src .description-content p { display: inline; }
    body table.rx-table--items .rx-compare-label { display: none; }

    /* potwory */
    body table.rx-table--monsters tbody tr {
        grid-template-columns: 44px auto auto 1fr;
        grid-template-areas:
            "img name name loc"
            "img hp   exp  ."
            "act act  act  act";
    }

    body table.rx-table--monsters .rx-cell-hp { grid-area: hp; }
    body table.rx-table--monsters .rx-cell-exp { grid-area: exp; }
    body table.rx-table--monsters .rx-cell-loc { grid-area: loc; justify-self: end; }

    /* NPC */
    body table.rx-table--npc tbody tr {
        grid-template-columns: 44px 1fr;
        grid-template-areas:
            "img name"
            "img loc"
            "desc desc"
            "act act";
    }

    body table.rx-table--npc .rx-cell-loc { grid-area: loc; color: var(--rx-muted) !important; }
    body table.rx-table--npc .rx-cell-desc { grid-area: desc; margin-top: 0.3rem; max-width: none !important; }

    /* taski */
    body table.rx-table--tasks tbody tr {
        grid-template-columns: 44px 1fr;
        grid-template-areas:
            "img name"
            "img desc"
            "cmd cmd"
            "rew rew"
            "act act";
    }

    body table.rx-table--tasks .rx-cell-desc { grid-area: desc; color: var(--rx-muted) !important; }
    body table.rx-table--tasks .rx-cell-cmd { grid-area: cmd; margin-top: 0.3rem; }
    body table.rx-table--tasks .rx-cell-rew { grid-area: rew; }

    body #scrollToTop span {
        display: none;
    }

    body #scrollToTop {
        padding: 0.7rem 0.8rem;
    }

    body .footer {
        text-align: left !important;
    }

    body .footer .row > div {
        text-align: left !important;
    }
}

/* widżet Discorda dopasowany do kart */
body .discord-widget,
body .discord-widget-header {
    background: transparent !important;
    border-color: var(--rx-line) !important;
    border-radius: 0 !important;
}

body .discord-widget-list {
    background: transparent !important;
}

/* poprawki tabel */
body table.rx-table > :not(:first-child) {
    border-top: 0 !important;
}

body .rx-table-wrap {
    overflow-x: auto;
}

body table.rx-table .description-cell,
body table.rx-table .description-content {
    white-space: normal !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    overflow: visible !important;
    max-height: none !important;
}

body table.rx-table--npc td img {
    max-height: 56px !important;
    max-width: 56px !important;
}

/* przedmioty: nagłówek grupy jako przełącznik (telefon) */
body .item-type-group > h3 .rx-chevron {
    display: none;
}

@media (max-width: 767.98px) {
    body table.rx-table--items tbody tr {
        grid-template-columns: 44px auto auto 1fr;
        grid-template-areas:
            "img name name check"
            "img desc desc desc"
            "prof lvl src src"
            "act  act act act";
    }

    body table.rx-table--items .rx-cell-id {
        display: none !important;
    }

    body table.rx-table--items .rx-cell-desc {
        margin-top: 0;
        font-size: 0.85rem;
    }

    body table.rx-table--items .rx-cell-prof,
    body table.rx-table--items .rx-cell-lvl,
    body table.rx-table--items .rx-cell-src {
        margin-top: 0.3rem;
        font-size: 0.8rem;
    }

    body table.rx-table--items .rx-cell-src {
        justify-self: end;
        text-align: right !important;
    }

    body .item-type-group {
        margin-bottom: 0.6rem !important;
    }

    body .item-type-group > h3 {
        cursor: pointer;
        padding: 0.8rem 0.9rem;
        margin: 0 !important;
        background: var(--rx-surface);
        border: 1px solid var(--rx-line);
        border-radius: var(--rx-radius);
        align-items: center;
    }

    body .item-type-group > h3 .rx-chevron {
        display: inline-block;
        margin-left: auto;
        color: var(--rx-muted);
        transition: transform 0.2s ease;
    }

    body .item-type-group:not(.rx-collapsed) > h3 {
        border-radius: var(--rx-radius) var(--rx-radius) 0 0;
    }

    body .item-type-group:not(.rx-collapsed) > h3 .rx-chevron {
        transform: rotate(180deg);
    }

    body .item-type-group:not(.rx-collapsed) .rx-table-wrap {
        border-top: 0 !important;
        border-radius: 0 0 var(--rx-radius) var(--rx-radius) !important;
    }

    body .item-type-group.rx-collapsed .rx-table-wrap {
        display: none;
    }
}

/* artykuł – nagłówek i odstępy */
body main .rx-article .rx-article-head h1 {
    color: #fff !important;
    text-align: left;
}

body .rx-article {
    max-width: none;
}

/* w treści z forum po każdej linii stoi dodatkowy <br> – bez niego odstępy są normalne */
body .rx-article .article-content div[style*="text-align"] + br {
    display: none;
}

body .rx-search-results h2 {
    color: var(--rx-muted);
}

body .rx-hero {
    position: relative;
    z-index: 5;
}

/* menu rozwijane w pasku: działa po kliknięciu i trzyma się przycisku także po przewinięciu */
body .rx-navbar .nav-item.dropdown {
    position: relative;
}

body .rx-navbar .nav-item.dropdown .dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

@media (min-width: 992px) {
    body .rx-navbar .nav-item.dropdown .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: auto !important;
        right: 0 !important;
        width: auto !important;
        min-width: 11rem !important;
        transform: none !important;
        margin-top: 0.35rem !important;
    }
}

body .rx-lang .dropdown-item.language-flag {
    justify-content: flex-start !important;
    text-align: left !important;
}

/* panel admina: lista użytkowników rozciągnięta na szerokość ekranu */
body .rx-users-page {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: min(1600px, calc(100vw - 1.5rem));
}

body .rx-users-table-wrap {
    overflow-x: visible;
}

body .rx-users-page table.rx-table {
    font-size: 0.9rem;
    width: 100%;
}

body .rx-users-page table.rx-table th,
body .rx-users-page table.rx-table td {
    padding: 0.55rem 0.6rem !important;
    white-space: nowrap;
}

body .rx-users-page table.rx-table td[data-label="Email"] {
    word-break: break-all;
}

@media (max-width: 767.98px) {
    body .rx-users-page table.rx-table th,
    body .rx-users-page table.rx-table td {
        white-space: normal;
    }
}

/* ---------- Artykuły: czytelność treści z forum ---------- */

/* article.css robi z wyśrodkowanych bloków kolumnę flex -> każdy span w osobnej linii */
body .rx-article .article-content div[style*="text-align"],
body .rx-article .article-content p[style*="text-align"] {
    display: block !important;
    flex-direction: row !important;
}

body .rx-article .article-content td[style*="text-align"],
body .rx-article .article-content th[style*="text-align"] {
    display: table-cell !important;
}

/* importowana treść z forum: tekst do lewej */
body .rx-article .article-content div[style*="text-align: center"],
body .rx-article .article-content div[style*="text-align:center"] {
    text-align: left !important;
    margin: 0 0 0.45rem;
}

/* jawne [center] autora zostaje wyśrodkowane */
body .rx-article .article-content div.bb-center,
body .rx-article .article-content .bbcode-align-center {
    text-align: center !important;
}

body .rx-article .article-content div[style*="text-align"]:has(> img:only-child),
body .rx-article .article-content div[style*="text-align"]:has(> a:only-child > img:only-child),
body .rx-article .article-content div[style*="text-align"]:has(> .ratio),
body .rx-article .article-content div[style*="text-align"]:has(> img):not(:has(> :not(img, br))),
body .rx-article .article-content div[style*="text-align"]:has(> a > img):not(:has(> :not(a, br))),
body .rx-article .article-content div[style*="text-align"]:has(> br > img) {
    text-align: center !important;
    margin: 0.75rem 0;
}

/* kolorowe poświaty z forum -> zwykły tekst */
body .rx-article .article-content span[style*="text-shadow"],
body .rx-article .article-content span[style*="text-shadow"] * {
    text-shadow: none !important;
}

/* zwielokrotnione <br> -> jeden */
body .rx-article .article-content br + br {
    display: none;
}

/* wykryte nagłówki sekcji (używane przez spis treści) */
body .rx-article .article-content .rx-toc-h {
    margin: 1.6rem 0 0.6rem !important;
    padding: 0.35rem 0 0.35rem 0.75rem;
    border-left: 3px solid var(--rx-accent);
}

body .rx-article .article-content .rx-toc-h .bbc_size,
body .rx-article .article-content .rx-toc-h span {
    font-weight: 700;
    color: #fff !important;
}

/* ---------- Spis treści ---------- */

body .rx-toc {
    margin: 0 0 1.5rem;
    padding: 1rem 1.15rem;
    background: rgba(91, 155, 255, 0.06);
    border: 1px solid var(--rx-line);
    border-radius: var(--rx-radius);
}

body .rx-toc strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #fff;
    letter-spacing: 0.02em;
}

body .rx-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 1.5rem;
}

body .rx-toc li {
    margin: 0.25rem 0;
    break-inside: avoid;
}

body .rx-toc a {
    color: var(--rx-text);
    text-decoration: none;
    font-size: 0.92rem;
}

body .rx-toc a:hover {
    color: var(--rx-accent);
}

body .rx-article .article-content .rx-toc-target {
    scroll-margin-top: 5.5rem;
}

@media (max-width: 767.98px) {
    body .rx-toc ul {
        columns: 1;
    }
}

/* ---------- Artykuły systemowe (Mastery, Bestiary i podobne) ---------- */

/* <br> za elementami blokowymi – niepotrzebne puste linie */
body .rx-article .article-content div + br,
body .rx-article .article-content p + br,
body .rx-article .article-content table + br,
body .rx-article .article-content ul + br,
body .rx-article .article-content ol + br,
body .rx-article .article-content blockquote + br,
body .rx-article .article-content pre + br,
body .rx-article .article-content h1 + br,
body .rx-article .article-content h2 + br,
body .rx-article .article-content h3 + br,
body .rx-article .article-content h4 + br,
body .rx-article .article-content h5 + br,
body .rx-article .article-content h6 + br,
body .rx-article .article-content div > br:first-child,
body .rx-article .article-content div > br:last-child {
    display: none;
}

/* nagłówki wewnątrz treści artykułu */
body .rx-article .article-content h1 {
    font-size: clamp(1.6rem, 4vw, 2rem);
    margin: 0.25rem 0 0.75rem;
    color: #fff;
}

body .rx-article .article-content h2 {
    font-size: 1.25rem;
    margin: 1.75rem 0 0.75rem;
    padding-bottom: 0.4rem;
    color: #fff;
    border-bottom: 1px solid var(--rx-line);
}

body .rx-article .article-content h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--rx-accent);
    margin: 0 0 0.25rem;
}

/* pasek statystyk */
body .rx-article .article-content .stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.25rem 0 1.75rem;
}

body .rx-article .article-content .stats > p {
    flex: 1 1 150px;
    margin: 0 !important;
    padding: 0.9rem 1.1rem;
    background: rgba(91, 155, 255, 0.07);
    border: 1px solid var(--rx-line);
    border-radius: var(--rx-radius);
    text-align: center;
}

body .rx-article .article-content .stats > p strong {
    display: block;
    font-size: 1.7rem;
    line-height: 1.15;
    color: var(--rx-accent);
}

body .rx-article .article-content .stats > p span {
    font-size: 0.82rem;
    color: var(--rx-muted);
}

/* siatki kart / kroków / typów charmów */
body .rx-article .article-content .cards,
body .rx-article .article-content .steps,
body .rx-article .article-content .charm-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin: 0.75rem 0 1.5rem;
}

body .rx-article .article-content .cards > .card,
body .rx-article .article-content .steps > .step,
body .rx-article .article-content .charm-types > .charm-type {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--rx-line);
    border-radius: var(--rx-radius);
    padding: 0.9rem 1rem;
}

body .rx-article .article-content .steps > .step > strong,
body .rx-article .article-content .charm-types > .charm-type > strong,
body .rx-article .article-content .cards > .card > strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--rx-accent);
    font-size: 0.95rem;
}

body .rx-article .article-content .steps > .step > p,
body .rx-article .article-content .charm-types > .charm-type > p,
body .rx-article .article-content .cards > .card > p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--rx-text);
}

/* wyróżnione ramki informacyjne */
body .rx-article .article-content .callout,
body .rx-article .article-content .mastery-core {
    margin: 1rem 0 1.5rem;
    padding: 0.9rem 1.1rem;
    background: rgba(91, 155, 255, 0.08);
    border-left: 3px solid var(--rx-accent);
    border-radius: var(--rx-radius-sm);
}

body .rx-article .article-content .callout > strong,
body .rx-article .article-content .mastery-core > strong {
    color: var(--rx-accent);
}

body .rx-article .article-content .callout > p,
body .rx-article .article-content .mastery-core > p {
    margin: 0.3rem 0 0;
}

/* lista komend */
body .rx-article .article-content .commands p {
    margin: 0.3rem 0;
}

body .rx-article .article-content .commands code {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--rx-line);
    border-radius: 6px;
    padding: 0.15rem 0.55rem;
    color: #9ecbff;
    font-size: 0.9em;
}

/* spis treści: małe, zwarte okienko */
body .rx-toc {
    display: inline-block;
    max-width: 360px;
    min-width: 240px;
    padding: 0.7rem 1rem;
}

body .rx-toc strong {
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rx-accent);
}

body .rx-toc ul {
    columns: 1 !important;
}

body .rx-toc li {
    margin: 0.15rem 0;
}

body .rx-toc li::before {
    content: '›';
    color: var(--rx-accent);
    margin-right: 0.4rem;
}

body .rx-toc a {
    font-size: 0.88rem;
}

/* zaimportowane <center> z forum -> jak inne wyśrodkowania: do lewej */
body .rx-article .article-content center {
    display: block;
    text-align: left;
    margin: 0 0 0.45rem;
}

/* artykuły z listami wymaganych przedmiotów (dostępy) */
body .rx-article .article-content .req-banner {
    text-align: center;
    margin: 0.5rem 0 1.25rem;
}

body .rx-article .article-content .req-banner img {
    max-width: 100%;
    border-radius: var(--rx-radius);
}

body .rx-article .article-content .req-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 0.6rem;
    margin: 1rem 0 1.5rem;
}

body .rx-article .article-content .req-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.7rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--rx-line);
    border-radius: var(--rx-radius-sm);
}

body .rx-article .article-content .req-item > div {
    flex: 1 1 auto;
    min-width: 0;
}

body .rx-article .article-content .req-item > div,
body .rx-article .article-content .req-item > div p {
    text-align: left;
}

body .rx-article .article-content .req-item > img {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    object-fit: contain;
}

body .rx-article .article-content .req-item strong {
    display: block;
    margin-bottom: 0.15rem;
    color: #fff;
    font-size: 0.95rem;
}

body .rx-article .article-content .req-item p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--rx-muted);
}

/* większe ikony — lista osiągnięć */
body .rx-article .article-content .ach-list .req-item {
    align-items: center;
}

body .rx-article .article-content .ach-list .req-item > img {
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
}

body .rx-article .article-content h1 small {
    font-size: 0.55em;
    color: var(--rx-muted);
    font-weight: 400;
}

/* kolumny w tabelach czarów (artykuł ma własny style z table-layout:fixed) */
body .rx-article .article-content .spells-container th:nth-child(1),
body .rx-article .article-content .spells-container td:nth-child(1) {
    width: 150px !important;
    min-width: 0 !important;
    max-width: none !important;
    white-space: normal !important;
}

body .rx-article .article-content .spells-container th:nth-child(2),
body .rx-article .article-content .spells-container td:nth-child(2) {
    width: 160px !important;
    min-width: 0 !important;
    max-width: none !important;
    white-space: nowrap !important;
}

body .rx-article .article-content .spells-container th:nth-child(3),
body .rx-article .article-content .spells-container td:nth-child(3) {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    white-space: normal !important;
    overflow: visible !important;
}

@media (max-width: 768px) {
    body .rx-article .article-content .spells-container th:nth-child(1),
    body .rx-article .article-content .spells-container td:nth-child(1) {
        width: 100px !important;
    }

    body .rx-article .article-content .spells-container th:nth-child(2),
    body .rx-article .article-content .spells-container td:nth-child(2) {
        width: 120px !important;
    }
}

/* powiększenie tabeli czarów o ~20% */
body .rx-article .article-content .spells-container .czary-spells {
    zoom: 1.2;
}

/* ikony profesji w artykule czary - większe */
body .rx-article .article-content .profession-icon {
    width: auto !important;
    height: 80px !important;
    max-width: none !important;
}

/* opt-in: cały artykuł wyśrodkowany (wrapper .rx-center w treści) */
body .rx-article .article-content .rx-center,
body .rx-article .article-content .rx-center div,
body .rx-article .article-content .rx-center p {
    text-align: center !important;
}

/* zwijany spis treści - belka rozwijana po kliknięciu */
body .rx-toc {
    cursor: pointer;
    user-select: none;
}

body .rx-toc strong::after {
    content: '▾';
    float: right;
    color: var(--rx-muted);
    transition: transform 0.2s;
}

body .rx-toc.open strong::after {
    transform: rotate(180deg);
}

body .rx-toc ul {
    display: none;
}

body .rx-toc.open ul {
    display: block;
}

/* bardzo szeroki ekran: spis treści jako panel po lewej stronie, poza kartą artykułu */
@media (min-width: 1600px) {
    body .rx-toc {
        position: fixed;
        top: 230px;
        left: max(8px, calc(50vw - 850px));
        width: 220px;
        margin: 0;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
        z-index: 1020;
        background: var(--rx-surface);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
}
