/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes glow {
    0%,
    100% {
        box-shadow: 0 0 5px rgba(11, 121, 207, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(11, 121, 207, 0.5);
    }
}

/* Animation utilities */
.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}
.animate-slide-in-down {
    animation: slideInDown 0.4s ease-out;
}
.animate-slide-in-up {
    animation: slideInUp 0.4s ease-out;
}
.animate-slide-in-left {
    animation: slideInLeft 0.4s ease-out;
}
.animate-slide-in-right {
    animation: slideInRight 0.4s ease-out;
}
.animate-scale-up {
    animation: scaleUp 0.3s ease-out;
}
.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}
.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* ========== SEARCH SUGGESTIONS ========== */
.search-suggestions {
    z-index: 999;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    width: 100%;
    max-height: 440px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(214, 221, 231, 0.92);
    border-radius: 18px;
    box-shadow: 0 22px 48px rgba(18, 39, 67, 0.16);
    overflow-y: auto;
    z-index: 1000;
    animation: fadeIn 0.25s ease-out;
}

.header__search {
    position: absolute;
    top: 14px;
    right: 18px;
    left: auto;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    width: clamp(320px, 34vw, 438px);
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(8, 16, 29, 0.36) 0%, rgba(8, 16, 29, 0.24) 100%);
    overflow: visible;
    backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 18px 36px rgba(8, 14, 24, 0.24);
}

.search-suggestion {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion:hover,
.search-suggestion.is-focused {
    background: rgba(11, 121, 207, 0.08);
    border-color: rgba(11, 121, 207, 0.14);
    transform: translateX(4px);
}

.search-suggestion__badge {
    flex: 0 0 auto;
    min-width: 68px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
    color: #045eaa;
    background: rgba(11, 121, 207, 0.12);
    border: 1px solid rgba(11, 121, 207, 0.12);
}

.search-suggestion__badge--section {
    color: #1f7a59;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.16);
}

.search-suggestion__content {
    flex: 1;
    min-width: 0;
}

.search-suggestion__title {
    font-size: 14px;
    font-weight: 500;
    color: #2c4159;
    margin-bottom: 4px;
    word-break: break-word;
}

.search-suggestion__title mark {
    background: rgba(11, 121, 207, 0.2);
    color: #045eaa;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}

.search-suggestion__meta {
    font-size: 12px;
    color: #6e8092;
    display: block;
    margin-bottom: 5px;
}

.search-suggestion__summary {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    color: #54687c;
}

.search-suggestion__score {
    font-size: 11px;
    font-weight: 600;
    color: #0b79cf;
    padding: 4px 8px;
    background: #e7f3fd;
    border-radius: 4px;
    margin-left: 8px;
    white-space: nowrap;
}

.search-no-results {
    display: block;
    padding: 18px 16px;
    color: #6e8092;
}

.search-no-results__content {
    text-align: left;
}

.search-no-results__title {
    font-size: 14px;
    font-weight: 500;
    color: #2c4159;
    margin-bottom: 4px;
}

.search-no-results__title strong {
    color: #0b79cf;
}

.search-no-results__hint {
    font-size: 12px;
    color: #6e8092;
}

.search-no-results__list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.search-no-results__link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(11, 121, 207, 0.08);
    color: #045eaa;
    font-size: 13px;
    font-weight: 600;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.search-no-results__link:hover {
    background: rgba(11, 121, 207, 0.14);
    transform: translateX(4px);
}

/* ========== SEARCH INPUT ENHANCEMENT ========== */
.header__search-input {
    transition: all 0.3s ease;
    position: relative;
    min-width: 0;
    height: 40px;
    padding: 0 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    color: #304356;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.header__search-input:focus {
    box-shadow: inset 0 0 0 2px #0b79cf;
}

.header__search-input::placeholder {
    color: rgba(110, 128, 146, 0.6);
    transition: all 0.3s ease;
}

.header__search-input:focus::placeholder {
    color: #6e8092;
}

.header__search-button {
    transition: all 0.3s ease;
    min-width: 112px;
    height: 40px;
    padding: 0 18px;
    border-radius: 14px;
    background: linear-gradient(180deg, #27a0ff 0%, #0b79cf 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 10px 18px rgba(11, 121, 207, 0.24);
}

.header__search-button:hover {
    background: linear-gradient(180deg, #4db0ff 0%, #0e84d9 100%);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 14px 24px rgba(11, 121, 207, 0.28);
}

.header__search-button:active {
    transform: translateY(0);
}

/* ========== SCROLLBAR ========== */
.search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: transparent;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: rgba(11, 121, 207, 0.3);
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: rgba(11, 121, 207, 0.5);
}

/* ========== ENHANCED DESIGN ========== */
.header {
    animation: slideInDown 0.6s ease-out;
}

.header__logo {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.header__search {
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.intro {
    animation: fadeIn 0.6s ease-out;
}

.intro__banner-item {
    animation: slideInUp 0.6s ease-out;
}
.intro__banner-item:nth-child(1) {
    animation-delay: 0.1s;
}
.intro__banner-item:nth-child(2) {
    animation-delay: 0.2s;
}
.intro__banner-item:nth-child(3) {
    animation-delay: 0.3s;
}
.intro__banner-item:nth-child(4) {
    animation-delay: 0.4s;
}

.intro__banner-card {
    transform: translateZ(0);
}

.intro__banner-card:hover {
    animation: none;
}

/* Sidebar animations */
.sidebar__item {
    animation: slideInLeft 0.5s ease-out;
}
.sidebar__item:nth-child(1) {
    animation-delay: 0s;
}
.sidebar__item:nth-child(2) {
    animation-delay: 0.08s;
}
.sidebar__item:nth-child(3) {
    animation-delay: 0.16s;
}
.sidebar__item:nth-child(4) {
    animation-delay: 0.24s;
}
.sidebar__item:nth-child(5) {
    animation-delay: 0.32s;
}
.sidebar__item:nth-child(6) {
    animation-delay: 0.4s;
}
.sidebar__item:nth-child(7) {
    animation-delay: 0.48s;
}
.sidebar__item:nth-child(8) {
    animation-delay: 0.56s;
}
.sidebar__item:nth-child(9) {
    animation-delay: 0.64s;
}
.sidebar__item:nth-child(10) {
    animation-delay: 0.72s;
}

.sidebar__link {
    position: relative;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #0b79cf;
    transition: width 0.3s ease;
}

.sidebar__link:hover::after {
    width: 100%;
}

.sidebar__item.is-open .sidebar__link {
    color: #0b79cf;
    font-weight: 600;
}

.sidebar__item.is-open .sidebar__link::after {
    width: 100%;
}

.sidebar__submenu {
    animation: slideInLeft 0.3s ease-out;
}

.sidebar__submenu-item {
    animation: fadeIn 0.3s ease-out;
}
.sidebar__submenu-item:nth-child(1) {
    animation-delay: 0s;
}
.sidebar__submenu-item:nth-child(2) {
    animation-delay: 0.05s;
}
.sidebar__submenu-item:nth-child(3) {
    animation-delay: 0.1s;
}
.sidebar__submenu-item:nth-child(4) {
    animation-delay: 0.15s;
}
.sidebar__submenu-item:nth-child(5) {
    animation-delay: 0.2s;
}
.sidebar__submenu-item:nth-child(6) {
    animation-delay: 0.25s;
}
.sidebar__submenu-item:nth-child(7) {
    animation-delay: 0.3s;
}
.sidebar__submenu-item:nth-child(8) {
    animation-delay: 0.35s;
}
.sidebar__submenu-item:nth-child(9) {
    animation-delay: 0.4s;
}
.sidebar__submenu-item:nth-child(10) {
    animation-delay: 0.45s;
}

.sidebar__submenu-link {
    transition: all 0.2s ease;
    position: relative;
    padding-left: 12px;
}

.sidebar__submenu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

.sidebar__submenu-link:hover,
.sidebar__submenu-link:focus-visible {
    padding-left: 18px;
}

.sidebar__submenu-link:hover::before,
.sidebar__submenu-link:focus-visible::before {
    opacity: 1;
}

/* Knowledge cards */
.knowledge-card {
    animation: scaleUp 0.4s ease-out;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid rgba(11, 121, 207, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.knowledge-card:hover {
    border-color: #0b79cf;
    box-shadow: 0 12px 32px rgba(11, 121, 207, 0.12);
    transform: translateY(-4px);
}

/* Исправление: кнопки wiki-panel не становятся синими */
.wiki-panel__action,
.knowledge-card__link,
.wiki-empty__link {
    background: rgba(11, 121, 207, 0.1) !important;
    color: #0b79cf !important;
    text-decoration: none !important;
}

.wiki-panel__action:hover,
.knowledge-card__link:hover,
.wiki-empty__link:hover {
    background: rgba(11, 121, 207, 0.18) !important;
    color: #0969b8 !important;
    text-decoration: none !important;
}

.knowledge-card__title a {
    position: relative;
    transition: color 0.3s ease;
}

.knowledge-card__title a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0b79cf;
    transition: width 0.3s ease;
}

.knowledge-card__title a:hover {
    color: #0b79cf;
}

.knowledge-card__title a:hover::after {
    width: 100%;
}

/* Form elements */
input[type='search'],
input[type='text'],
textarea,
select {
    transition: all 0.3s ease;
    border: 1px solid #d6dde7;
    border-radius: 6px;
}

input[type='search']:focus,
input[type='text']:focus,
textarea:focus,
select:focus {
    border-color: #0b79cf;
    box-shadow: 0 0 0 3px rgba(11, 121, 207, 0.1);
}

input[type='search']:hover:not(:focus),
input[type='text']:hover:not(:focus),
textarea:hover:not(:focus),
select:hover:not(:focus) {
    border-color: rgba(11, 121, 207, 0.5);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .search-suggestions {
        left: 0;
        right: 0;
        width: 100%;
        max-height: 360px;
    }

    .search-suggestion {
        padding: 10px 12px;
    }

    .search-suggestion__badge {
        min-width: 58px;
        padding: 6px 8px;
        font-size: 10px;
    }

    .search-suggestion__score {
        display: none;
    }

    .search-no-results {
        padding: 16px 12px;
    }

    .search-no-results__title {
        font-size: 12px;
    }

    .search-no-results__hint {
        font-size: 11px;
    }

    @supports (animation-delay: 0s) {
        .sidebar__item,
        .intro__banner-item {
            animation-delay: 0s !important;
        }
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    * {
        animation: none !important;
        transition: none !important;
    }

    body {
        background: white;
    }

    a {
        text-decoration: underline;
    }
}

/* ========================================
   BUG FIX: Text visible on card hover
   ======================================== */

/* Исправление: текст должен быть выше синего оверлея ::after */
.intro__banner-title,
.intro__banner-info {
    position: relative;
    z-index: 2 !important;
}

/* ========================================
   BUG FIX: Search dropdown clipped
   ======================================== */

/* Исправление: выпадающий список поиска обрезается из-за overflow: hidden */
.header__banner,
.header__inner {
    overflow: visible !important;
}

/* Исправление: поисковая строка справа */
.header__search {
    position: relative !important;
    z-index: auto !important;
    margin-left: auto;
}

/* Выпадающий список - FIXED позиционирование через JavaScript */
/* Позиционируется JS-кодом в search-v2.js */

/* У рекламных блоков z-index меньше чем у поиска */
.ad-block {
    z-index: 1 !important;
}

.ad-header,
.ad-content-top,
.ad-content-bottom,
.ad-section-break {
    z-index: 1 !important;
}

/* Сайдбар реклама не должна ломать сетку */
.sidebar .ad-sidebar {
    margin: 20px 10px;
    width: calc(100% - 20px);
}

/* ========================================
   BUG FIX: Banner cards hover - text stays visible
   ======================================== */

/* Исправление: при наведении текст остаётся видимым */
.intro__banner-card {
    position: relative;
}

.intro__banner-card::before {
    z-index: 1;
}

.intro__banner-card::after {
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    z-index: 1;
}

.intro__banner-card:hover::after,
.intro__banner-card:focus-visible::after {
    opacity: 0.15 !important;
}

.intro__banner-title,
.intro__banner-info {
    position: relative;
    z-index: 10 !important;
    color: #fff !important;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8) !important;
}

/* На мобильных отключаем hover эффект */
@media (max-width: 768px) {
    .intro__banner-card::after {
        display: none !important;
    }

    .intro__banner-title,
    .intro__banner-info {
        opacity: 1 !important;
        transform: none !important;
        text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9) !important;
    }
}

/* Исправление: на мобильных лого видно поверх фона */
@media (max-width: 991px) {
    .header__banner,
    .header__inner {
        overflow: visible !important;
    }

    .header__logo {
        z-index: 10 !important;
        position: relative;
    }

    /* Уменьшаем затемнение чтобы лого было видно */
    .header__banner::after {
        opacity: 0.3 !important;
    }
}

/* ========================================
   BUG FIX: Banner cards hover - text stays visible
   ======================================== */

/* Исправление: при наведении текст остаётся видимым */
.intro__banner-card {
    position: relative;
}

.intro__banner-card::after {
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.intro__banner-card:hover::after,
.intro__banner-card:focus-visible::after {
    opacity: 0.3 !important;
}

.intro__banner-title,
.intro__banner-info {
    position: relative;
    z-index: 10 !important;
    color: #fff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6) !important;
}

/* На мобильных отключаем hover эффект */
@media (max-width: 768px) {
    .intro__banner-card::after {
        display: none !important;
    }

    .intro__banner-title,
    .intro__banner-info {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ========================================
   WEAPONS SECTION STYLES
   ======================================== */

.weapons {
    margin-top: 34px;
}

.weapons + .skills {
    margin-top: 34px;
}

.weapons__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
}

.weapons__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.weapons__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(216, 223, 233, 0.45);
    transition: transform 0.28s ease;
}

.weapons__item + .weapons__item {
    margin-top: 0;
}

.weapons__item:hover {
    transform: translateX(5px);
}

.weapons__item:hover .icon {
    transform: translateY(-2px);
}

.weapons__item .link {
    font-size: 14px;
    color: #1f2328;
    text-decoration: none;
    transition: color 0.24s ease;
}

.weapons__item .link:hover {
    color: #0b79cf;
}

/* Weapons icons background colors matching existing pattern */
.weapons .icon--sword {
    background: linear-gradient(135deg, #4a90d9 0%, #6ba8e8 100%);
}
.weapons .icon--dagger {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}
.weapons .icon--bow {
    background: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
}
.weapons .icon--blunt {
    background: linear-gradient(135deg, #d63031 0%, #ff7675 100%);
}
.weapons .icon--pole {
    background: linear-gradient(135deg, #e17055 0%, #fab1a0 100%);
}
.weapons .icon--big {
    background: linear-gradient(135deg, #fdcb6e 0%, #ffeaa7 100%);
}
.weapons .icon--fist {
    background: linear-gradient(135deg, #fd79a8 0%, #ffcccc 100%);
}
.weapons .icon--dual {
    background: linear-gradient(135deg, #0984e3 0%, #74b9ff 100%);
}
.weapons .icon--armor {
    background: linear-gradient(135deg, #636e72 0%, #b2bec3 100%);
}
.weapons .icon--acc {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
}
.weapons .icon--sa {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
}
.weapons .icon--mammon {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .weapons__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ========================================
   CLASS TREE
   ======================================== */

.rich-block--class-tree {
    overflow: hidden;
}

.class-tree {
    display: grid;
    gap: 20px;
}

.class-tree__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(11, 121, 207, 0.12);
}

.class-tree__tab {
    padding: 7px 14px;
    border: 1px solid #c9d8e6;
    background: linear-gradient(180deg, #ffffff, #f2f7fb);
    color: #24527a;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.class-tree__tab:hover,
.class-tree__tab.is-active {
    color: #0b79cf;
    border-color: rgba(11, 121, 207, 0.35);
    background: linear-gradient(180deg, #ffffff, #eef7ff);
}

.class-tree__pane {
    display: none;
    gap: 24px;
}

.class-tree__pane.is-active {
    display: grid;
}

.class-tree-group {
    display: grid;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(44, 65, 89, 0.1);
}

.class-tree-group:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.class-tree-group__head {
    text-align: center;
}

.class-tree-group__title {
    color: #0b79cf;
    font-size: 1.45rem;
    line-height: 1.2;
}

.class-tree-group__description {
    margin-top: 8px;
    color: #6e8092;
    font-size: 0.95rem;
}

.class-tree-group__canvas {
    position: relative;
    overflow-x: auto;
}

.class-tree-group__canvas::after {
    content: '';
    display: block;
    min-height: calc(var(--class-tree-rows, 3) * 150px);
}

.class-tree-group__grid,
.class-tree-group__links {
    position: absolute;
    inset: 0;
    min-width: calc(var(--class-tree-columns, 5) * 160px);
    min-height: calc(var(--class-tree-rows, 3) * 150px);
}

.class-tree-group__grid {
    display: grid;
    grid-template-columns: repeat(var(--class-tree-columns, 5), minmax(120px, 1fr));
    grid-template-rows: repeat(var(--class-tree-rows, 3), minmax(120px, 1fr));
    align-items: start;
    justify-items: center;
    gap: 8px 18px;
    padding: 0 10px;
}

.class-tree-group__links {
    overflow: visible;
}

.class-tree-group__links path {
    fill: none;
    stroke: rgba(138, 148, 160, 0.92);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.class-tree-group__links marker path {
    fill: rgba(138, 148, 160, 0.92);
    stroke: none;
}

.class-tree-node {
    display: grid;
    justify-items: center;
    gap: 8px;
    width: min(100%, 124px);
    padding: 4px;
    color: #2c4159;
    text-align: center;
}

.class-tree-node--link:hover .class-tree-node__label {
    color: #0b79cf;
}

.class-tree-node__icon-shell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
}

.class-tree-node__icon {
    width: auto;
    max-width: 78px;
    height: auto;
    max-height: 78px;
    object-fit: contain;
    image-rendering: auto;
}

.class-tree-node__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1px solid rgba(11, 121, 207, 0.24);
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.98), rgba(229, 237, 244, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    color: #5f6f81;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.class-tree-node__label {
    color: #3d5f84;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
}

.class-tree-node__note {
    color: #7c8f9f;
    font-size: 11px;
    line-height: 1.2;
}

/* ========================================
   MAP COMPONENT WITH NPC LOCATION MARKERS
   ======================================== */

.npc-map-container {
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    border: 2px solid rgba(11, 121, 207, 0.2);
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
}

.npc-map-stage {
    position: relative;
    line-height: 0;
    aspect-ratio: 567 / 767;
    isolation: isolate;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.78), transparent 34%),
        #ebe4d5;
}

.npc-map-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    z-index: 1;
}

.npc-map-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.npc-map-marker {
    position: absolute;
    display: block;
    width: 14px;
    height: 14px;
    background: #ff0000;
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 8px rgba(255, 0, 0, 0.6),
        0 0 16px rgba(255, 0, 0, 0.4);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    touch-action: manipulation;
    text-decoration: none;
    pointer-events: auto;
}

.npc-map-marker::before {
    content: '';
    position: absolute;
    inset: -10px;
}

.npc-map-marker:hover,
.npc-map-marker:focus-visible,
.npc-map-marker:active {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow:
        0 0 12px rgba(255, 0, 0, 0.8),
        0 0 24px rgba(255, 0, 0, 0.5);
}

.npc-map-marker:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.92);
    outline-offset: 2px;
}

.npc-map-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: rgba(255, 0, 0, 0.2);
    border-radius: 50%;
    animation: pulse-marker 2s ease-in-out infinite;
}

@keyframes pulse-marker {
    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.npc-map-marker--npc {
    background: #e53935;
}

.npc-map-marker--location {
    background: #c62828;
}

.npc-map-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(44, 65, 89, 0.95);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: normal;
    text-align: center;
    max-width: min(220px, calc(100vw - 40px));
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 20;
    pointer-events: none;
}

.npc-map-tooltip strong {
    display: block;
}

.npc-map-tooltip__note {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.78);
}

.npc-map-marker:hover .npc-map-tooltip,
.npc-map-marker:focus-visible .npc-map-tooltip,
.npc-map-marker:active .npc-map-tooltip {
    opacity: 1;
    visibility: visible;
}

.npc-map-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(44, 65, 89, 0.95);
}

/* Map legend */
.npc-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(11, 121, 207, 0.2);
    font-size: 12px;
}

.npc-map-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.npc-map-legend-marker {
    width: 10px;
    height: 10px;
    background: #ff0000;
    border: 2px solid #fff;
    border-radius: 50%;
}

.npc-map-legend-marker--npc {
    background: #e53935;
}

.npc-map-legend-marker--location {
    background: #c62828;
}

.npc-map-legend-text {
    color: #2c4159;
    font-weight: 500;
}

.weapon-table__local-name {
    display: block;
    margin-top: 3px;
    color: #5c6f82;
    font-size: 12px;
    line-height: 1.25;
}

/* Responsive map */
@media (max-width: 768px) {
    .class-tree-group__head {
        text-align: left;
    }

    .class-tree-group__title {
        font-size: 1.2rem;
    }

    .class-tree-group__grid,
    .class-tree-group__links {
        min-width: calc(var(--class-tree-columns, 5) * 132px);
        min-height: calc(var(--class-tree-rows, 3) * 140px);
    }

    .class-tree-group__canvas::after {
        min-height: calc(var(--class-tree-rows, 3) * 140px);
    }

    .npc-map-container {
        max-width: 100%;
        border-radius: 8px;
    }

    .npc-map-stage {
        aspect-ratio: 567 / 767;
    }

    .npc-map-marker {
        width: 13px;
        height: 13px;
    }

    .npc-map-legend {
        flex-direction: column;
        gap: 8px;
    }

    .npc-map-tooltip {
        padding: 6px 8px;
        font-size: 11px;
        max-width: min(180px, calc(100vw - 32px));
    }
}
