.spy-total-count {
    font-size: 0.82rem;
    white-space: nowrap;
    margin-bottom: 0.5rem;
}

.spy-count {
    font-weight: 700;
    color: var(--text-primary);
}

.spy-rank {
    font-variant-numeric: tabular-nums;
}

.spy-gear-update {
    white-space: nowrap;
}

.spy-gear-update__date {
    font-variant-numeric: tabular-nums;
}

.spy-gear-update__count {
    color: var(--accent);
    font-size: 0.78rem;
    margin-left: 0.25rem;
}

.spy-placeholder-msg {
    font-style: italic;
}

.spy-placeholder-row td {
    padding: 1.5rem 0.5rem;
}

.spy-char-row .char-link {
    font-weight: 600;
    text-decoration: none;
    transition: filter 0.15s ease;
}

.spy-char-row .char-link:hover {
    text-decoration: underline;
    filter: brightness(1.25);
}

.spy-char-gear-btn {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.spy-gear-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: var(--r, 10px);
    background: color-mix(in srgb, var(--class-color, var(--accent)) 8%, var(--bg-secondary));
    border: 1px solid color-mix(in srgb, var(--class-color, var(--border-primary)) 20%, transparent);
}

.spy-gear-header__info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.spy-gear-header__name {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.spy-gear-header__meta {
    font-size: 0.85rem;
}

.spy-gear-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 1.25rem;
    align-items: start;
}

.spy-gear-layout__paperdoll { margin-bottom: 0; }
.spy-gear-changes { margin-bottom: 0; }

.spy-gear-changes__body {
    padding: 0;
}

.spy-gear-changes__empty {
    padding: 1.25rem 1rem;
    text-align: center;
    font-size: 0.88rem;
}

.spy-gear-changes__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.spy-gear-changes__group-date {
    list-style: none;
    padding: 0.55rem 1rem 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, var(--text-secondary));
    font-variant-numeric: tabular-nums;
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, var(--bg-surface-1), color-mix(in srgb, var(--bg-surface-1) 85%, transparent));
    backdrop-filter: blur(2px);
    z-index: 1;
}

.spy-gear-changes__group-date:not(:first-child) {
    border-top: 1px solid var(--border-subtle);
}

.spy-gear-change {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid var(--border-faint, var(--border-subtle));
    font-size: 0.88rem;
    border-left: 3px solid transparent;
}

.spy-gear-change:last-child {
    border-bottom: none;
}

.spy-gear-change--item {
    border-left-color: var(--accent, #4a90d9);
}

.spy-gear-change__slot {
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted, var(--text-secondary));
    min-width: 4.5rem;
}

.spy-gear-change__flow {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.5rem;
    min-width: 0;
}

.spy-gear-change__icon {
    width: 22px;
    height: 22px;
    border-radius: var(--r, 4px);
    border: 1px solid color-mix(in srgb, var(--quality-color, var(--border-subtle)) 60%, var(--border-subtle));
    flex-shrink: 0;
    object-fit: cover;
}

.spy-gear-change__item {
    font-weight: 600;
    line-height: 1.25;
    word-break: break-word;
    text-decoration: none;
    color: var(--quality-color);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: filter 0.15s ease;
}

.spy-gear-change__item:hover {
    filter: brightness(1.2);
}

.spy-gear-change__ilvl {
    font-weight: 400;
    font-size: 0.72rem;
    opacity: 0.72;
    margin-left: 0.15rem;
    font-variant-numeric: tabular-nums;
}

.spy-gear-change__arrow {
    color: var(--text-muted, var(--text-secondary));
    font-weight: 700;
    opacity: 0.7;
}

.spy-gear-changes__body .admin-pagination {
    border-top: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem;
}

@media (max-width: 980px) {
    .spy-gear-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .spy-gear-layout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .spy-gear-change {
        font-size: 0.82rem;
    }
}
