﻿:root {
        --bg: #07090f;
        --bg-soft: rgba(12, 16, 24, 0.82);
        --panel: rgba(18, 22, 32, 0.9);
        --panel-2: rgba(26, 32, 44, 0.92);
        --line: rgba(166, 176, 196, 0.18);
        --text: #eef2ff;
        --muted: #aab5c9;
        --accent: #7ef0c5;
        --accent-2: #6bb6ff;
        --warn: #ffce73;
        --danger: #ff8b8b;
        --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    }

    .content.magic-page-shell {
        min-height: 100vh;
        padding: 28px 18px 48px;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        background:
            radial-gradient(circle at top left, rgba(91, 115, 255, 0.12), transparent 34%),
            radial-gradient(circle at bottom right, rgba(126, 240, 197, 0.12), transparent 30%),
            linear-gradient(180deg, #06070b 0%, #090c13 100%);
    }

    .magic-page {
        width: min(1400px, 100%);
        color: var(--text);
        font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
        position: relative;
    }

    .magic-page::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 28px;
        border: 1px solid rgba(255, 255, 255, 0.06);
        pointer-events: none;
    }

    .hero {
        padding: 18px;
        margin-bottom: 18px;
        border-radius: 28px;
        background:
            linear-gradient(135deg, rgba(20, 25, 36, 0.98), rgba(10, 13, 19, 0.95)),
            var(--bg-soft);
        box-shadow: var(--shadow);
        border: 1px solid var(--line);
        overflow: hidden;
        position: relative;
    }

    .hero::after {
        content: "";
        position: absolute;
        inset: auto -10% -30% auto;
        width: 320px;
        height: 320px;
        background: radial-gradient(circle, rgba(126, 240, 197, 0.12), transparent 68%);
        filter: blur(6px);
        pointer-events: none;
    }

    .hero-frame {
        display: grid;
        grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
        gap: 16px;
        align-items: stretch;
        position: relative;
        z-index: 1;
    }

    .hero-copy,
    .hero-aside {
        border-radius: 22px;
        border: 1px solid rgba(255, 255, 255, 0.06);
        background: rgba(255, 255, 255, 0.025);
        backdrop-filter: blur(8px);
    }

    .hero-copy {
        padding: 26px 26px 24px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 16px;
    }

    .hero-aside {
        padding: 18px;
        display: grid;
        gap: 14px;
        align-content: start;
    }

    .hero h1 {
        margin: 0;
        font-size: clamp(2.2rem, 4.2vw, 3.8rem);
        line-height: 1;
        letter-spacing: -0.03em;
        font-weight: 900;
        font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
        text-align: left;
    }

    .hero p {
        margin: 12px 0 0;
        max-width: 760px;
        color: var(--muted);
        font-size: 14px;
        line-height: 1.6;
        text-align: center;
    }

    .hero-aside-title {
        font-size: 11px;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: var(--accent);
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .hero-ranking-switch {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .hero-ranking-switch button {
        appearance: none;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.03);
        color: var(--muted);
        padding: 8px 12px;
        border-radius: 999px;
        cursor: pointer;
        font-size: 12px;
        line-height: 1;
        transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .hero-ranking-switch button:hover {
        transform: translateY(-1px);
        border-color: rgba(126, 240, 197, 0.2);
    }

    .hero-ranking-switch button.is-active {
        color: var(--text);
        box-shadow: 0 0 0 1px rgba(126, 240, 197, 0.08);
    }

    .hero-ranking-switch button.is-active[data-ranking-mode="views"] {
        background: rgba(107, 182, 255, 0.12);
        border-color: rgba(107, 182, 255, 0.32);
        box-shadow: 0 0 0 1px rgba(107, 182, 255, 0.10), 0 0 18px rgba(107, 182, 255, 0.08);
    }

    .hero-ranking-switch button.is-active[data-ranking-mode="likes"] {
        background: rgba(255, 139, 139, 0.12);
        border-color: rgba(255, 139, 139, 0.32);
        box-shadow: 0 0 0 1px rgba(255, 139, 139, 0.10), 0 0 18px rgba(255, 139, 139, 0.08);
    }

    .hero-ranking-switch button.is-press {
        transform: scale(0.97);
    }

    .ranking-icon {
        font-size: 13px;
        line-height: 1;
        display: inline-block;
        transform: translateY(-0.5px);
    }

    .hero-ranking {
        display: grid;
        gap: 10px;
    }

    .hero-ranking-item {
        padding: 12px 13px 11px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.025);
        border: 1px solid rgba(255, 255, 255, 0.08);
        display: grid;
        gap: 10px;
        position: relative;
        overflow: hidden;
        transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
    }

    .hero-ranking-item.rank-1 {
        border-color: rgba(255, 208, 102, 0.28);
    }

    .hero-ranking-item.rank-2 {
        border-color: rgba(206, 214, 228, 0.26);
    }

    .hero-ranking-item.rank-3 {
        border-color: rgba(206, 154, 103, 0.26);
    }

    .hero-ranking-item.rank-1::before,
    .hero-ranking-item.rank-2::before,
    .hero-ranking-item.rank-3::before {
        content: "";
        position: absolute;
        inset: 0 auto 0 0;
        width: 4px;
    }

    .hero-ranking-item.rank-1::before {
        background: linear-gradient(180deg, rgba(255, 211, 108, 0.95), rgba(181, 130, 28, 0.9));
    }

    .hero-ranking-item.rank-2::before {
        background: linear-gradient(180deg, rgba(216, 222, 235, 0.95), rgba(141, 153, 176, 0.9));
    }

    .hero-ranking-item.rank-3::before {
        background: linear-gradient(180deg, rgba(216, 152, 97, 0.95), rgba(139, 86, 43, 0.9));
    }

    .hero-ranking-left {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .hero-ranking-pos {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        place-items: center;
        font-size: 20px;
        line-height: 1;
        font-weight: 800;
        color: var(--text);
        background: rgba(126, 240, 197, 0.09);
        border: 1px solid rgba(126, 240, 197, 0.18);
        flex: none;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 8px 16px rgba(0, 0, 0, 0.16);
    }

    .hero-ranking-item.rank-1 .hero-ranking-pos {
        background: rgba(255, 208, 102, 0.14);
        border-color: rgba(255, 208, 102, 0.32);
    }

    .hero-ranking-item.rank-2 .hero-ranking-pos {
        background: rgba(206, 214, 228, 0.12);
        border-color: rgba(206, 214, 228, 0.30);
    }

    .hero-ranking-item.rank-3 .hero-ranking-pos {
        background: rgba(206, 154, 103, 0.12);
        border-color: rgba(206, 154, 103, 0.30);
    }

    .hero-ranking-row {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .hero-ranking-meta {
        display: grid;
        gap: 0;
        min-width: 0;
        flex: 1;
    }

    .hero-ranking-name {
        font-size: 13px;
        font-weight: 700;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero-ranking-value {
        color: var(--text);
        font-size: 14px;
        font-weight: 900;
        flex: none;
        min-width: 34px;
        text-align: right;
    }

    .hero-ranking-bar {
        width: 100%;
        height: 6px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.05);
        overflow: hidden;
    }

    .hero-ranking-bar span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, rgba(126, 240, 197, 0.95), rgba(107, 182, 255, 0.95));
        box-shadow: 0 0 18px rgba(126, 240, 197, 0.18);
        transition: width 220ms ease;
    }

    .hero-ranking-item.rank-1 .hero-ranking-bar span {
        background: linear-gradient(90deg, rgba(255, 211, 108, 0.98), rgba(255, 170, 56, 0.95));
    }

    .hero-ranking-item.rank-2 .hero-ranking-bar span {
        background: linear-gradient(90deg, rgba(216, 222, 235, 0.96), rgba(160, 170, 188, 0.92));
    }

    .hero-ranking-item.rank-3 .hero-ranking-bar span {
        background: linear-gradient(90deg, rgba(216, 152, 97, 0.96), rgba(181, 111, 58, 0.94));
    }

    .hero-ranking-empty {
        padding: 18px 14px;
        border-radius: 18px;
        border: 1px dashed rgba(255, 255, 255, 0.14);
        color: var(--muted);
        text-align: center;
        font-size: 12px;
    }

    .hero-mini-card strong {
        font-size: 13px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--text);
    }

    .hero-mini-card span {
        color: var(--muted);
        font-size: 12px;
    }

    .workspace {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;
        align-items: start;
    }

    .panel {
        background: linear-gradient(180deg, rgba(22, 28, 40, 0.98), rgba(10, 13, 18, 0.96));
        border: 1px solid var(--line);
        border-radius: 28px;
        box-shadow: var(--shadow);
        overflow: hidden;
    }

    .panel-header {
        padding: 18px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        display: flex;
        gap: 14px;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .panel-title {
        display: grid;
        gap: 4px;
    }

    .panel-title h2 {
        margin: 0;
        font-size: 20px;
        letter-spacing: -0.03em;
    }

    .panel-title span {
        color: var(--muted);
        font-size: 13px;
    }

    .search-box {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        min-width: min(340px, 100%);
    }

    .search-box input {
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--text);
        width: 100%;
        font-size: 14px;
    }

    .search-box input::placeholder {
        color: rgba(234, 240, 255, 0.45);
    }

    .magic-grid-wrap {
        padding: 18px;
    }

    .magic-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, 160px);
        gap: 10px;
        width: 100%;
        max-width: none;
        justify-content: center;
    }

    .magic-card {
        appearance: none;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 0;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
            rgba(16, 20, 29, 0.95);
        color: inherit;
        padding: 8px 10px;
        text-align: left;
        cursor: pointer;
        transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
        display: grid;
        grid-template-columns: auto auto 1fr;
        grid-template-areas:
            "name name name"
            "icon classes classes";
        column-gap: 8px;
        row-gap: 0;
        align-items: center;
        align-content: center;
        min-height: 62px;
        position: relative;
        overflow: hidden;
    }

    .magic-card:hover,
    .magic-card:focus-visible {
        transform: translateY(-2px);
        border-color: rgba(126, 240, 197, 0.45);
        box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
        outline: none;
    }

    .magic-card.is-active {
        border-color: rgba(126, 240, 197, 0.85);
        background:
            linear-gradient(180deg, rgba(126, 240, 197, 0.09), rgba(255, 255, 255, 0.02)),
            rgba(16, 20, 29, 0.98);
        box-shadow: 0 0 0 1px rgba(126, 240, 197, 0.22), 0 22px 42px rgba(0, 0, 0, 0.38);
    }

    .magic-name {
        grid-area: name;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.25;
        margin-top: 0;
        transform: translateY(-3px);
    }

    .magic-icon {
        grid-area: icon;
        width: 26px;
        height: 26px;
        border-radius: 0;
        background: transparent;
        border: 0;
        overflow: hidden;
        display: grid;
        place-items: center;
        flex: none;
    }

    .magic-icon img {
        width: 26px;
        height: 26px;
        object-fit: cover;
        image-rendering: pixelated;
        border-radius: 0;
    }

    .magic-meta {
        display: contents;
    }

    .magic-sub {
        grid-area: classes;
        display: flex;
        gap: 0;
        flex-wrap: wrap;
        font-size: 11px;
        color: var(--muted);
        align-items: center;
        justify-content: flex-start;
        align-self: center;
        min-width: 0;
        padding-top: 1px;
    }

    .class-icons {
        display: flex;
        gap: 6px;
        align-items: center;
        justify-content: center;
    }

    .class-icon {
        width: 22px;
        height: 22px;
        display: inline-grid;
        place-items: center;
        border-radius: 4px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.03);
        opacity: 0.28;
        filter: saturate(0.65);
        transition: opacity 160ms ease, filter 160ms ease, border-color 160ms ease, background 160ms ease;
        flex: none;
    }

    .class-icon.active {
        opacity: 1;
        filter: saturate(1);
    }

    .class-icon.warrior {
        border-color: rgba(255, 114, 114, 0.28);
        background: rgba(255, 114, 114, 0.06);
    }

    .class-icon.hunter {
        border-color: rgba(120, 214, 255, 0.28);
        background: rgba(120, 214, 255, 0.06);
    }

    .class-icon.wizard {
        border-color: rgba(181, 140, 255, 0.28);
        background: rgba(181, 140, 255, 0.06);
    }

    .class-icon svg {
        width: 12px;
        height: 12px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .class-icon .emoji {
        font-size: 14px;
        line-height: 1;
        transform: translateY(-0.5px);
    }

    .tag {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 5px 9px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.03);
        color: var(--text);
        font-size: 11px;
        line-height: 1;
    }

    .tag.accent {
        border-color: rgba(126, 240, 197, 0.28);
        background: rgba(126, 240, 197, 0.08);
        color: #a7f7de;
    }

    .tag.blue {
        border-color: rgba(107, 182, 255, 0.28);
        background: rgba(107, 182, 255, 0.08);
        color: #b6d6ff;
    }

    .tag.warn {
        border-color: rgba(255, 206, 115, 0.28);
        background: rgba(255, 206, 115, 0.08);
        color: #ffe0a0;
    }

    .tag.dim {
        color: var(--muted);
    }

    .tag.class {
        border-color: rgba(126, 240, 197, 0.28);
        background: rgba(126, 240, 197, 0.08);
        color: #baf6e2;
    }

    .tag.attribute {
        border-color: rgba(107, 182, 255, 0.28);
        background: rgba(107, 182, 255, 0.08);
        color: #d7eaff;
    }

    .hint-line {
        color: var(--muted);
        font-size: 12px;
        line-height: 1.4;
    }

    .detail {
        display: grid;
        gap: 0;
    }

    .detail-body {
        padding: 18px;
        display: grid;
        gap: 14px;
    }

    .detail-header-line {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
        flex: 1 1 auto;
    }

    .detail-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: none;
    }

    .detail-icon img {
        width: auto;
        height: auto;
        max-width: 27px;
        max-height: 27px;
        image-rendering: pixelated;
    }

    .detail-name {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .detail-name h2 {
        margin: 0;
        font-size: 18px;
        line-height: 1;
        letter-spacing: -0.03em;
    }

    .spell-actions {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-end;
        margin-left: auto;
    }

    .spell-stat-pill,
    .spell-like-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 34px;
        padding: 0 12px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.04);
        color: var(--text);
        font-size: 12px;
        line-height: 1;
    }

    .spell-stat-pill {
        color: var(--muted);
    }

    .spell-like-btn {
        cursor: pointer;
        color: #ffd8d8;
        border-color: rgba(255, 139, 139, 0.22);
        background: rgba(255, 139, 139, 0.06);
        transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
    }

    .spell-like-btn:hover:not(:disabled) {
        transform: translateY(-1px);
        border-color: rgba(255, 139, 139, 0.42);
        background: rgba(255, 139, 139, 0.1);
    }

    .spell-like-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

    .spell-like-btn.is-active {
        border-color: rgba(255, 139, 139, 0.5);
        box-shadow: 0 0 0 1px rgba(255, 139, 139, 0.1);
    }

    .detail-divider {
        color: rgba(238, 242, 255, 0.25);
        font-size: 16px;
        line-height: 1;
        margin-top: -1px;
    }

    .detail-classes {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .detail-classes-label {
        color: var(--muted);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.14em;
    }

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

    .info-card {
        padding: 14px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
        display: grid;
        gap: 6px;
    }

    .info-card span {
        color: var(--muted);
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.14em;
    }

    .info-card strong {
        font-size: 18px;
        line-height: 1.1;
    }

    .detail-list {
        display: grid;
        gap: 10px;
    }

    .level-table-wrap {
        border-radius: 18px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.03);
    }

    .level-table-head {
        padding: 12px 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        color: var(--muted);
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.12em;
    }

    .table-scroll {
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
        -webkit-overflow-scrolling: touch;
    }

    .level-table {
        width: 100%;
        min-width: 1180px;
        border-collapse: collapse;
        font-size: 13px;
    }

    .level-table th,
    .level-table td {
        padding: 10px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        text-align: left;
        white-space: nowrap;
    }

    .level-table th {
        color: var(--muted);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        background: rgba(255, 255, 255, 0.02);
    }

    .level-table tbody tr:hover {
        background: rgba(126, 240, 197, 0.06);
    }

    .level-table tbody tr.special-level td {
        color: #ffd27a;
    }

    .level-table tbody tr.special-level td:first-child {
        background: rgba(255, 210, 122, 0.08);
        box-shadow: inset 0 0 0 1px rgba(255, 210, 122, 0.12);
        width: 42px;
        min-width: 42px;
        max-width: 42px;
    }

    .level-table tbody tr.special-level:hover td:first-child {
        background: rgba(255, 210, 122, 0.12);
    }

    .spell-description {
        display: none;
        margin-top: 12px;
        padding: 14px 16px 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        background: rgba(255, 255, 255, 0.02);
    }

    .spell-description.is-visible {
        display: grid;
        gap: 10px;
    }

    .spell-description-title {
        color: var(--muted);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.14em;
    }

    .spell-elements {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .spell-element {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 10px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.04);
        color: var(--text);
        font-size: 11px;
        letter-spacing: 0.04em;
        line-height: 1;
    }

    .spell-element img {
        width: 15px;
        height: 15px;
        image-rendering: pixelated;
        display: block;
    }

    .spell-element.fire { border-color: rgba(255, 102, 102, 0.45); background: rgba(255, 102, 102, 0.08); color: #ffb3b3; }
    .spell-element.water { border-color: rgba(102, 204, 255, 0.45); background: rgba(102, 204, 255, 0.08); color: #c9efff; }
    .spell-element.earth { border-color: rgba(255, 153, 153, 0.45); background: rgba(255, 153, 153, 0.08); color: #ffd9d9; }
    .spell-element.thunder { border-color: rgba(255, 255, 153, 0.45); background: rgba(255, 255, 153, 0.08); color: #fff6bf; }
    .spell-element.holy { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.08); color: #ffffff; }
    .spell-element.dark { border-color: rgba(204, 153, 204, 0.45); background: rgba(204, 153, 204, 0.08); color: #ebd4eb; }
    .spell-element.gel { border-color: rgba(153, 255, 255, 0.45); background: rgba(153, 255, 255, 0.08); color: #dcffff; }
    .spell-element.metal { border-color: rgba(204, 204, 204, 0.45); background: rgba(204, 204, 204, 0.08); color: #f0f0f0; }

    .spell-description p {
        margin: 0;
        color: rgba(238, 242, 255, 0.88);
        font-size: 13px;
        line-height: 1.7;
    }

    .level-table td:first-child,
    .level-table th:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        background: linear-gradient(90deg, rgba(18, 22, 32, 0.98), rgba(18, 22, 32, 0.92));
        font-weight: 700;
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .level-table td:last-child,
    .level-table th:last-child {
        text-align: center;
    }

    .pierce-value {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 18px;
        font-weight: 700;
        line-height: 1;
        font-size: 13px;
    }

    .pierce-value.yes {
        color: #86f6a3;
    }

    .pierce-value.no {
        color: #ff8f8f;
    }

    .pierce-value.neutral {
        color: var(--muted);
        opacity: 0.75;
    }

    .detail-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.06);
        color: var(--text);
    }

    .detail-row small {
        color: var(--muted);
    }

    .detail-row strong {
        font-size: 14px;
    }

    .class-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px;
        width: auto;
    }

    .class-chip {
        display: grid;
        gap: 2px;
        justify-items: center;
        padding: 5px 8px 4px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.04);
        color: var(--muted);
        font-size: 10px;
        line-height: 1;
        cursor: pointer;
        user-select: none;
        opacity: 0.32;
        filter: saturate(0.65);
        min-width: 62px;
        transition: opacity 160ms ease, filter 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
    }

    .chip-name {
        font-size: 10px;
        line-height: 1;
        white-space: nowrap;
    }

    .chip-level {
        font-size: 9px;
        line-height: 1;
        opacity: 0.74;
        white-space: nowrap;
    }

    .class-chip.warrior {
        border-color: rgba(255, 114, 114, 0.28);
        background: rgba(255, 114, 114, 0.06);
    }

    .class-chip.hunter {
        border-color: rgba(120, 214, 255, 0.28);
        background: rgba(120, 214, 255, 0.06);
    }

    .class-chip.wizard {
        border-color: rgba(181, 140, 255, 0.28);
        background: rgba(181, 140, 255, 0.06);
    }

    .class-chip.active {
        color: var(--text);
        border-color: rgba(126, 240, 197, 0.45);
        background: rgba(126, 240, 197, 0.08);
        opacity: 1;
        filter: saturate(1);
    }

    .class-chip.warrior.active {
        border-color: rgba(255, 114, 114, 0.5);
        background: rgba(255, 114, 114, 0.12);
        color: #ffd0d0;
    }

    .class-chip.hunter.active {
        border-color: rgba(120, 214, 255, 0.5);
        background: rgba(120, 214, 255, 0.12);
        color: #d2f0ff;
    }

    .class-chip.wizard.active {
        border-color: rgba(181, 140, 255, 0.5);
        background: rgba(181, 140, 255, 0.12);
        color: #eadcff;
    }

    .empty {
        color: rgba(238, 242, 255, 0.7);
        font-size: 14px;
        line-height: 1.6;
    }

    .search-note {
        margin: 0;
        color: var(--muted);
        font-size: 11px;
        line-height: 1.45;
        max-width: 430px;
    }

    @media (max-width: 1120px) {
        .workspace {
            grid-template-columns: 1fr;
        }

        .magic-grid {
            grid-template-columns: repeat(auto-fit, 160px);
        }

        .stats-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (max-width: 760px) {
        .content.magic-page-shell {
            padding: 18px 12px 28px;
        }

        .hero {
            padding: 20px;
        }

        .hero-frame {
            grid-template-columns: 1fr;
        }

        .hero-copy {
            padding: 20px;
        }

        .hero-aside {
            padding: 16px;
        }

        .panel-header {
            padding: 16px;
        }

        .magic-grid {
            width: 100%;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
        }

        .magic-card {
            padding: 7px 8px;
            min-height: 58px;
        }

        .magic-name {
            font-size: 13px;
            transform: translateY(-2px);
        }

        .magic-icon,
        .magic-icon img {
            width: 24px;
            height: 24px;
        }

        .magic-sub {
            font-size: 10px;
        }

        .stats-grid {
            grid-template-columns: 1fr;
        }

        .detail-header-line {
            flex-wrap: wrap;
        }

        .search-box {
            min-width: 100%;
        }
    }

    @media (max-width: 520px) {
        .magic-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 6px;
        }

        .level-table {
            min-width: 1040px;
        }
    }

    @media (max-width: 360px) {
        .magic-grid {
            grid-template-columns: 1fr;
        }
    }

