.trs-root {
    --trs-bg: #0f172a;
    --trs-card: linear-gradient(180deg, #e8f4fc 0%, #dfe9f2 100%);
    --trs-text: #1e3a5f;
    --trs-muted: #5a6b7d;
    --trs-accent: #f59e0b;
    --trs-accent2: #fbbf24;
    --trs-on: #22c55e;
    --trs-badge: #3b82f6;
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 1.25rem 1.25rem 1.5rem;
    border-radius: 14px;
    background: var(--trs-bg);
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.5),
        0 0 0 1px rgba(148, 163, 184, 0.2);
}

.trs-title {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #f8fafc;
}

.trs-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.trs-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 200px;
}

.trs-field__label {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.trs-select {
    border-radius: 10px;
    border: 1px solid #475569;
    background: #020617;
    color: #e5e7eb;
    padding: 0.5rem 0.65rem;
    font-size: 0.95rem;
    outline: none;
    max-width: 100%;
}

.trs-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

.trs-shadow-eq {
    margin-bottom: 0.75rem;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid #475569;
}

.trs-shadow-eq__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(9.5rem, 13rem);
    gap: 0.5rem 0.85rem;
    align-items: start;
}

.trs-shadow-eq__main {
    min-width: 0;
}

.trs-shadow-eq__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.2rem;
}

.trs-shadow-eq__title {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 700;
    color: #e2e8f0;
}

.trs-shadow-eq__level-wrap {
    font-size: 0.78rem;
    color: #94a3b8;
    white-space: nowrap;
}

.trs-shadow-eq__level {
    font-size: 0.95rem;
    color: #fbbf24;
    font-variant-numeric: tabular-nums;
}

.trs-shadow-eq__next {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    line-height: 1.3;
    color: #cbd5e1;
}

.trs-shadow-eq__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
}

.trs-shadow-eq__btn {
    padding: 0.28rem 0.55rem;
    border-radius: 8px;
    border: 1px solid #64748b;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

.trs-shadow-eq__btn:hover:not(:disabled) {
    background: #334155;
    border-color: #94a3b8;
}

.trs-shadow-eq__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.trs-shadow-eq__btn--up {
    border-color: #f59e0b;
    background: linear-gradient(180deg, #451a03, #292524);
    color: #fde68a;
}

.trs-shadow-eq__spent {
    padding: 0.15rem 0 0.15rem 0.65rem;
    border-left: 1px solid #475569;
    text-align: right;
}

.trs-shadow-eq__spent-title {
    margin: 0 0 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trs-shadow-eq__spent-empty {
    margin: 0;
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.25;
}

.trs-shadow-eq__spent-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.trs-shadow-eq__spent-row {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.76rem;
    color: #e2e8f0;
}

.trs-shadow-eq__spent-row span:first-child {
    text-align: right;
    flex: 1;
    min-width: 0;
}

.trs-shadow-eq__spent-val {
    flex-shrink: 0;
    font-weight: 700;
    color: #a5f3fc;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
    .trs-shadow-eq__layout {
        grid-template-columns: 1fr;
    }

    .trs-shadow-eq__spent {
        border-left: none;
        border-top: 1px solid #475569;
        padding: 0.45rem 0 0;
        text-align: left;
    }

    .trs-shadow-eq__spent-row {
        justify-content: space-between;
    }

    .trs-shadow-eq__spent-row span:first-child {
        text-align: left;
    }
}

.trs-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.trs-tab {
    flex: 1;
    padding: 0.55rem 1rem;
    border-radius: 10px 10px 0 0;
    border: 1px solid #334155;
    border-bottom: none;
    background: #1e293b;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.trs-tab:hover {
    color: #e2e8f0;
}

.trs-tab--active {
    background: #334155;
    color: #f8fafc;
    border-color: #475569;
}

.trs-currency {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid #334155;
}

.trs-currency__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.trs-currency__name {
    font-size: 0.88rem;
    color: #94a3b8;
}

.trs-currency__value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fbbf24;
    font-variant-numeric: tabular-nums;
}

.trs-summary {
    margin-bottom: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.65);
    border: 1px dashed #475569;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #cbd5e1;
}

.trs-summary__line {
    margin: 0;
}

.trs-summary__line + .trs-summary__line {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(71, 85, 105, 0.5);
}

.trs-summary strong {
    color: #f8fafc;
}

.trs-panels {
    border: 1px solid #334155;
    border-radius: 0 12px 12px 12px;
    background: rgba(15, 23, 42, 0.6);
    padding: 1rem;
}

.trs-panel[hidden] {
    display: none !important;
}

.trs-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

/* Карточка навыка */
.trs-card {
    position: relative;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.65);
    color: rgba(30, 41, 59, 0.65);
    padding: 0.75rem 0.85rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 280px;
}

.trs-card__index {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    color: var(--trs-text);
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.trs-card__head {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    padding-left: 1.5rem;
}

.trs-card__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(145deg, #bae6fd, #7dd3fc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: #0c4a6e;
    text-align: center;
    line-height: 1.15;
    padding: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.trs-card__meta {
    flex: 1;
    min-width: 0;
}

.trs-card__name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
}

.trs-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.trs-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.trs-badge--lv {
    background: var(--trs-badge);
    color: #fff;
}

.trs-badge--on {
    background: var(--trs-on);
    color: #fff;
}

.trs-card__fx {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--trs-muted);
}

.trs-card__fx-label {
    margin-top: 0.35rem;
    font-size: 0.76rem;
    color: #e2e7ec;
}

.trs-card__fx-label:first-child {
    margin-top: 0;
}

.trs-card__fx strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--trs-accent);
}

.trs-card__req {
    margin: 0.25rem 0 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: #dc2626;
    line-height: 1.35;
}

.trs-card__btn {
    margin-top: auto;
    padding: 0.55rem 0.75rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.82rem;
    color: #422006;
    background: linear-gradient(180deg, var(--trs-accent2), var(--trs-accent));
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.45);
    transition: filter 0.12s, transform 0.12s;
}

.trs-card__btn:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.trs-card__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.trs-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--trs-muted);
    padding-top: 0.25rem;
}

.trs-toggle input {
    width: 44px;
    height: 24px;
    accent-color: var(--trs-on);
    cursor: pointer;
}

.trs-hint {
    margin: 1rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
}

@media (max-width: 480px) {
    .trs-cards {
        grid-template-columns: 1fr;
    }
}
