.talent-class-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	justify-content: center;
	margin-bottom: 16px;
}

.talent-class-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 6px;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s;
}

.talent-class-btn:hover {
	background: rgba(0, 0, 0, 0.5);
	border-color: rgba(255, 255, 255, 0.2);
	text-decoration: none;
}

.talent-class-btn.active {
	background: rgba(0, 0, 0, 0.5);
	border-color: rgba(255, 255, 255, 0.25);
}

.talent-class-icon {
	width: 24px;
	height: 24px;
	border-radius: 4px;
}

.talent-class-name {
	font-size: 13px;
	color: var(--text-muted);
}

.talent-class-btn.active .talent-class-name {
	font-weight: bold;
}

/* points bar */
.talent-points-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	padding: 8px 12px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 6px;
	margin-bottom: 12px;
	font-size: 13px;
	color: var(--text-muted);
}

.talent-points-full {
	color: #e05555;
}

.talent-points-bar .talent-actions {
	margin-left: auto;
}

/* actions */
.talent-actions {
	display: flex;
	gap: 6px;
}

.talent-actions-mop {
	justify-content: center;
	margin-top: 12px;
}

.talent-btn {
	padding: 4px 14px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 4px;
	color: var(--text-color-normal);
	font-size: 12px;
	cursor: pointer;
	transition: background 0.15s;
}

.talent-btn:hover {
	background: rgba(255, 255, 255, 0.12);
}

.talent-btn-share {
	min-width: 60px;
}

/* tree layout */
.talent-trees {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.talent-tree {
	width: fit-content;
	background-color: rgba(0, 0, 0, 0.6);
	background-size: cover;
	background-position: center;
	background-blend-mode: overlay;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	overflow: hidden;
}

.talent-tree-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	background: rgba(0, 0, 0, 0.7);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.talent-tree-icon {
	width: 32px;
	height: 32px;
	border-radius: 4px;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.talent-tree-name {
	flex: 1;
	font-size: 14px;
	font-weight: bold;
	color: var(--text-color-normal);
}

.talent-tree-points {
	font-size: 14px;
	font-weight: bold;
	color: var(--text-muted);
}

/* talent grid */
.talent-tree-grid {
	position: relative;
	margin: 0 auto;
}

.talent-branch {
	position: absolute;
	z-index: 1;
	background-repeat: no-repeat;
	pointer-events: none;
}

.talent-cell {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
}

.talent-has-talent {
	cursor: pointer;
}

.talent-icon {
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	border-radius: 6px;
	border: 2px solid rgba(255, 255, 255, 0.2);
	transition: filter 0.15s, opacity 0.15s, border-color 0.15s;
}

/* talent states */
.talent-locked .talent-icon {
	filter: grayscale(1);
	opacity: 0.35;
	border-color: rgba(0, 0, 0, 0.5);
}

.talent-locked {
	cursor: default;
}

.talent-available .talent-icon {
	filter: grayscale(0.3);
	opacity: 0.7;
	border-color: rgba(255, 255, 255, 0.3);
}

.talent-available:hover .talent-icon {
	opacity: 0.9;
	border-color: rgba(255, 255, 255, 0.5);
}

.talent-active .talent-icon {
	filter: none;
	opacity: 1;
	border-color: #4ade80;
	box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

.talent-maxed .talent-icon {
	filter: none;
	opacity: 1;
	border-color: #fbbf24;
	box-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}

/* rank badge */
.talent-rank {
	position: absolute;
	bottom: -2px;
	right: -2px;
	background: rgba(0, 0, 0, 0.85);
	color: var(--text-muted);
	font-size: 10px;
	font-weight: bold;
	padding: 0 3px;
	border-radius: 3px;
	line-height: 1.4;
	pointer-events: none;
}

.talent-active .talent-rank {
	color: #4ade80;
}

.talent-maxed .talent-rank,
.rank-maxed {
	color: #fbbf24;
}

/* custom (curated) tree extras */
.talent-tree-reset {
	width: 20px;
	height: 20px;
	padding: 0;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 4px;
	color: var(--text-muted);
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.talent-tree-reset:hover {
	background: rgba(224, 85, 85, 0.3);
	color: var(--text-color-normal);
}

.talent-hovered .talent-icon,
.talent-order-entry.talent-hovered .talent-order-icon {
	border-color: #ffffff;
	box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

.talent-order {
	margin-top: 12px;
	padding: 8px 12px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 6px;
}

.talent-order-title {
	font-size: 13px;
	font-weight: bold;
	color: var(--text-color-normal);
	margin-bottom: 6px;
}

.talent-order-empty {
	font-size: 12px;
	color: var(--text-muted);
}

.talent-order-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.talent-order-entry {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	width: 44px;
	cursor: default;
}

.talent-order-icon {
	width: 32px;
	height: 32px;
	box-sizing: border-box;
	border-radius: 6px;
	border: 2px solid rgba(255, 255, 255, 0.2);
	transition: border-color 0.15s;
}

.talent-order-level {
	font-size: 10px;
	color: var(--text-muted);
	white-space: nowrap;
}

/* spec bar (mop) */
.talent-spec-bar {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-bottom: 16px;
}

.talent-spec-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: rgba(0, 0, 0, 0.3);
	border: 2px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.15s;
	color: var(--text-muted);
}

.talent-spec-btn:hover {
	background: rgba(0, 0, 0, 0.4);
	border-color: rgba(255, 255, 255, 0.2);
}

.talent-spec-btn.active {
	border-color: var(--link-color);
	color: var(--text-color-normal);
	background: rgba(0, 0, 0, 0.5);
}

.talent-spec-icon {
	width: 36px;
	height: 36px;
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.talent-spec-name {
	font-weight: bold;
	font-size: 14px;
}

.talent-spec-role {
	display: inline-block;
	width: 14px;
	height: 14px;
	background-image: url(/static/images/interface/role-icons.webp?v=e96a4eb);
	background-repeat: no-repeat;
	background-size: 42px 14px;
	opacity: 0.6;
}

.talent-spec-role-0 { background-position: 0 0; }
.talent-spec-role-1 { background-position: -14px 0; }
.talent-spec-role-2 { background-position: -28px 0; }

/* tier layout (mop) */
.talent-tiers {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: 700px;
	margin: 0 auto;
}

.talent-tier-row {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

.talent-tier-level {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	min-width: 48px;
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	font-size: 16px;
	font-weight: bold;
	color: var(--text-muted);
}

.talent-tier-choices {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	flex: 1;
}

.talent-choice {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s;
	filter: grayscale(1);
	opacity: 0.6;
}

.talent-choice:hover {
	background: rgba(0, 0, 0, 0.4);
	opacity: 0.8;
}

.talent-choice.selected {
	filter: none;
	opacity: 1;
	border-color: #4ade80;
	box-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

.talent-choice-icon {
	width: 40px;
	height: 40px;
	border-radius: 6px;
	border: 2px solid rgba(255, 255, 255, 0.2);
	flex-shrink: 0;
}

.talent-choice.selected .talent-choice-icon {
	border-color: #4ade80;
}

.talent-choice-name {
	font-size: 13px;
	font-weight: 500;
	color: var(--text-color-normal);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* responsive */
@media (max-width: 900px) {
	.talent-class-name {
		display: none;
	}

	.talent-class-icon {
		width: 28px;
		height: 28px;
	}
}

@media (max-width: 700px) {
	.talent-tier-choices {
		grid-template-columns: 1fr;
	}

	.talent-tier-level {
		width: 36px;
		min-width: 36px;
		font-size: 13px;
	}

	.talent-spec-bar {
		flex-wrap: wrap;
	}

	.talent-spec-btn {
		padding: 6px 10px;
	}

	.talent-points-bar {
		font-size: 12px;
		gap: 8px;
	}
}

/* trait system (retail), mirrors in-game ClassTalentsFrame 1612x856 */
.trait-frame {
	position: relative;
	width: 100%;
	max-width: 1612px;
	margin: 0 auto;
	overflow: hidden;
}

.trait-canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 1612px;
	height: 856px;
	transform-origin: top left;
	background: #000;
	font-family: 'Friz Quadrata', serif;
	user-select: none;
}

.trait-canvas img {
	max-width: none;
}

.trait-canvas-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 1612px;
	height: 774px;
	background-size: 1612px 774px;
	background-repeat: no-repeat;
}

.trait-bottombar {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 1612px;
	height: 82px;
	background: url('/static/images/talents/retail/atlas/talents-background-bottombar.webp?v=a660c0a') no-repeat;
	background-size: 1612px 82px;
	z-index: 2;
}

.trait-bottombar .talent-actions {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	gap: 12px;
}

/* currency headers, anchors from blizzard_classtalentsframe.xml */
.trait-currency-display {
	position: absolute;
	top: 45px;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	text-shadow: 1px -1px 2px #000;
	z-index: 3;
}

.trait-currency-display-class {
	left: 372px;
}

.trait-currency-display-spec {
	left: 1211px;
}

.trait-currency-label {
	font-size: 18px;
	color: #fff;
	letter-spacing: 0.5px;
}

.trait-currency-amount {
	font-size: 32px;
	color: #1eff00;
	min-width: 54px;
}

.trait-currency-empty {
	color: #808080;
}

/* edges */
.trait-edge-line {
	position: absolute;
	height: 6px;
	transform-origin: 0 50%;
	background-repeat: repeat-x;
	background-size: 16px 100%;
	pointer-events: none;
	z-index: 2;
}

.trait-edge-head {
	position: absolute;
	width: 28px;
	height: 24px;
	pointer-events: none;
	z-index: 2;
}

/* gates */
.trait-gate {
	position: absolute;
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: 25px;
	transform: translate(-100%, -50%);
	pointer-events: none;
	z-index: 3;
}

.trait-gate-text {
	font-size: 22px;
	color: rgb(255, 163, 143);
	text-shadow: 1px -1px 2px #000;
}

.trait-gate-icon {
	width: 168px;
	height: 28px;
}

/* nodes */
.trait-node {
	position: absolute;
	transform: translate(-50%, -50%);
	cursor: pointer;
	z-index: 4;
}

.trait-node-shadow {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 95%;
	height: 95%;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.trait-node-icon {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 80%;
	height: 80%;
	transform: translate(-50%, -50%);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.trait-node-circle .trait-node-icon,
.trait-node-capstone .trait-node-icon {
	border-radius: 50%;
}

/* if masks render solid, switch mask-mode to luminance */
.trait-node-choice .trait-node-icon {
	-webkit-mask-image: url('/static/images/talents/retail/atlas/talents-node-choice-mask.webp?v=89e95da');
	mask-image: url('/static/images/talents/retail/atlas/talents-node-choice-mask.webp?v=89e95da');
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
}

.trait-node-icon-left {
	-webkit-mask-image: url('/static/images/talents/retail/atlas/talents-node-choice-mask.webp?v=89e95da'), url('/static/images/talents/retail/atlas/common-mask-semicircle-left.webp?v=10e0dee');
	mask-image: url('/static/images/talents/retail/atlas/talents-node-choice-mask.webp?v=89e95da'), url('/static/images/talents/retail/atlas/common-mask-semicircle-left.webp?v=10e0dee');
	-webkit-mask-composite: source-in;
	mask-composite: intersect;
}

.trait-node-icon-right {
	-webkit-mask-image: url('/static/images/talents/retail/atlas/talents-node-choice-mask.webp?v=89e95da'), url('/static/images/talents/retail/atlas/common-mask-semicircle-right.webp?v=1c3f3e2');
	mask-image: url('/static/images/talents/retail/atlas/talents-node-choice-mask.webp?v=89e95da'), url('/static/images/talents/retail/atlas/common-mask-semicircle-right.webp?v=1c3f3e2');
	-webkit-mask-composite: source-in;
	mask-composite: intersect;
}

.trait-node-ring {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.trait-node-circle .trait-node-ring {
	width: 90%;
	height: 90%;
}

.trait-node-square .trait-node-ring {
	width: 100%;
	height: 100%;
}

.trait-node-choice .trait-node-ring {
	width: 112%;
	height: 100%;
}

.trait-node-capstone .trait-node-ring {
	width: 131%;
	height: 131%;
}

/* node states */
.trait-node-locked {
	cursor: default;
}

.trait-node-gray .trait-node-icon,
.trait-node-locked .trait-node-icon {
	filter: grayscale(1) brightness(0.7);
}

.trait-node-green:hover .trait-node-icon {
	filter: brightness(1.15);
}

/* rank text */
.trait-node-rank {
	position: absolute;
	left: 50%;
	bottom: -4px;
	transform: translateX(calc(-50% + 11px));
	font-size: 16px;
	color: #ffd100;
	text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
	pointer-events: none;
	white-space: nowrap;
	z-index: 5;
}

.trait-node-green .trait-node-rank {
	color: #1eff00;
}

.trait-node-gray .trait-node-rank,
.trait-node-locked .trait-node-rank {
	color: #808080;
}

/* hero panel */
.trait-hero-plate {
	position: absolute;
	width: 284px;
	height: 362px;
	transform: translateX(-50%);
	pointer-events: none;
	z-index: 3;
}

.trait-hero-plate-blank {
	position: absolute;
	width: 252px;
	height: 282px;
	transform: translate(-50%, -50%);
	pointer-events: none;
	z-index: 3;
}

.trait-hero-button {
	position: absolute;
	width: 108px;
	height: 108px;
	transform: translate(-50%, -50%);
	cursor: pointer;
	z-index: 5;
}

.trait-hero-button-icon {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
}

.trait-hero-button-half-left {
	-webkit-mask-image: url('/static/images/talents/retail/atlas/common-mask-semicircle-left.webp?v=10e0dee');
	mask-image: url('/static/images/talents/retail/atlas/common-mask-semicircle-left.webp?v=10e0dee');
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
}

.trait-hero-button-half-right {
	-webkit-mask-image: url('/static/images/talents/retail/atlas/common-mask-semicircle-right.webp?v=1c3f3e2');
	mask-image: url('/static/images/talents/retail/atlas/common-mask-semicircle-right.webp?v=1c3f3e2');
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
}

.trait-hero-ring {
	position: absolute;
	width: 192px;
	height: 192px;
	left: 50%;
	top: 50%;
	transform: translate(-50%, calc(-50% + 2px));
	pointer-events: none;
	max-width: none;
}

.trait-hero-currency {
	position: absolute;
	left: 50%;
	top: 100%;
	width: 56px;
	height: 56px;
	transform: translate(-50%, calc(-50% + 3px));
	pointer-events: none;
}

.trait-hero-currency img {
	position: absolute;
	inset: 0;
}

.trait-hero-currency span {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	color: #1eff00;
	text-shadow: 1px -1px 2px #000;
}

.trait-hero-label {
	position: absolute;
	transform: translate(-50%, -100%);
	font-size: 18px;
	color: #fff;
	text-shadow: 1px -1px 2px #000;
	white-space: nowrap;
	z-index: 5;
}

.trait-hero-choose {
	position: absolute;
	transform: translate(-50%, -100%);
	display: flex;
	flex-direction: column;
	align-items: center;
	color: #1eff00;
	text-shadow: 1px -1px 2px #000;
	white-space: nowrap;
	z-index: 5;
}

.trait-hero-choose-small {
	font-size: 15px;
}

.trait-hero-choose-big {
	font-size: 22px;
}

/* choice node flyout */
.trait-choice-backdrop {
	position: absolute;
	inset: 0;
	z-index: 90;
}

.trait-choice-popup {
	position: absolute;
	z-index: 100;
	pointer-events: none;
}

.trait-choice-options {
	display: flex;
	gap: 4px;
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	padding-bottom: 10px;
	pointer-events: auto;
}

.trait-choice-option {
	position: relative;
	width: 64px;
	height: 64px;
	cursor: pointer;
	transition: transform 0.15s;
}

.trait-choice-option:hover {
	transform: scale(1.08);
}

.trait-choice-option-icon {
	position: absolute;
	inset: 15%;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
}

.trait-choice-option-ring {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

/* hero selection dialog */
.trait-hero-dialog {
	position: absolute;
	inset: 0;
	z-index: 110;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: flex-start;
	justify-content: center;
}

.trait-hero-dialog-inner {
	position: relative;
	width: 962px;
	height: 809px;
	margin-top: 24px;
	background-size: 962px 809px;
	background-repeat: no-repeat;
	padding: 20px 56px;
}

.trait-hero-dialog-close {
	position: absolute;
	top: 18px;
	right: 22px;
	background: none;
	border: none;
	color: #ffd100;
	font-size: 28px;
	cursor: pointer;
	line-height: 1;
}

.trait-hero-dialog-title {
	text-align: center;
	font-size: 26px;
	color: #ffd100;
	text-shadow: 1px -1px 2px #000;
	padding: 12px 0 4px;
}

.trait-hero-dialog-columns {
	display: flex;
	justify-content: center;
	gap: 20px;
	height: calc(100% - 60px);
}

.trait-hero-dialog-divider {
	width: 7px;
	background: url('/static/images/talents/retail/atlas/spec-columndivider.webp?v=7a7be44') no-repeat center;
	background-size: 100% 100%;
}

.trait-hero-dialog-column {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
	padding-top: 34px;
}

.trait-hero-dialog-ring {
	position: relative;
	width: 162px;
	height: 162px;
}

.trait-hero-dialog-ring-icon {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
}

.trait-hero-dialog-ring img {
	position: absolute;
	width: 248px;
	height: 248px;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
	max-width: none;
}

.trait-hero-dialog-name {
	font-size: 24px;
	color: #ffd100;
	text-shadow: 1px -1px 2px #000;
	margin-top: 34px;
}

.trait-hero-dialog-desc {
	font-family: var(--font-general);
	font-size: 13px;
	color: var(--text-muted);
	max-width: 340px;
	min-height: 56px;
}

.trait-hero-dialog-preview {
	position: relative;
	width: 200px;
	flex: 1;
}

.trait-preview-node {
	position: absolute;
	transform: translate(-50%, -50%);
}

.trait-hero-dialog-select {
	margin-bottom: 10px;
}
