.specialisation-trigger {
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    color: inherit;
    background: none;
    cursor: pointer;
    font: inherit;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.specialisation-trigger:not(:disabled)::after {
    display: inline-block;
    margin-inline-start: .4em;
    color: var(--accent-3, #b48cff);
    content: "→";
    transition: transform .2s ease;
}
.specialisation-trigger:not(:disabled):hover,
.specialisation-trigger:not(:disabled):focus-visible {
    color: var(--accent-3, #b48cff);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.specialisation-trigger:not(:disabled):hover::after,
.specialisation-trigger:not(:disabled):focus-visible::after { transform: translateX(3px); }
.specialisation-trigger:disabled { cursor: default; }
.talent-card-link {
    display: flex;
    width: 100%;
    margin-top: 26px;
    min-height: 76px;
    padding: 13px 16px;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(var(--accent-3-rgb), .32);
    border-radius: 14px;
    color: var(--text);
    background: rgba(var(--accent-2-rgb), .08);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color .2s ease, background-color .2s ease;
}
.talent-card-link:hover,
.talent-card-link:focus-visible { border-color: var(--accent-3, #b48cff); background: rgba(var(--accent-2-rgb), .16); }
.talent-card-link:focus-visible { outline: 2px solid var(--accent-3, #b48cff); outline-offset: 3px; }
.talent-card-emblem { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; overflow: hidden; border: 2px solid rgba(var(--accent-3-rgb), .8); border-radius: 50%; color: var(--accent-3, #b48cff); background: #21152d; box-shadow: 0 0 14px rgba(var(--accent-3-rgb), .2); font-size: 1.35rem; }
.talent-card-emblem img { width: 100%; height: 100%; object-fit: cover; }
.talent-card-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.talent-card-copy strong { overflow: hidden; color: var(--text); font-family: Bungee, sans-serif; font-size: .95rem; font-weight: normal; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.talent-card-copy > span { color: var(--accent-3, #b48cff); font-size: .75rem; font-weight: 650; }
.talent-card-arrow { flex: none; margin-left: auto; color: var(--accent-3, #b48cff); font-size: 1.35rem; line-height: 1; transition: transform .2s ease; }
.talent-card-link:hover .talent-card-arrow,
.talent-card-link:focus-visible .talent-card-arrow { transform: translateX(4px); }
html:has(.talent-dialog[open]) { overflow-y: hidden; scrollbar-gutter: stable; }
.talent-dialog {
    --talent-dialog-height: min(92dvh, 980px);
    width: min(1420px, calc(100vw - 32px));
    max-width: none;
    max-height: var(--talent-dialog-height);
    padding: 0;
    overflow: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(var(--accent-2-rgb), .55);
    border-radius: 22px;
    color: var(--text);
    background: #121017;
    box-shadow: 0 40px 120px rgba(0,0,0,.8), 0 0 60px rgba(var(--accent-2-rgb),.16);
}
.talent-dialog::backdrop { background: rgba(6,4,9,.83); backdrop-filter: blur(6px); }
.talent-dialog-shell { display: flex; flex-direction: column; max-height: calc(var(--talent-dialog-height) - 2px); }
.talent-dialog-header { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; }
.talent-dialog-content { min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 clamp(18px, 2.8vw, 36px) clamp(18px, 2.8vw, 36px); }
.talent-tree-kicker,
.talent-detail-category { color: var(--accent-3, #b48cff); font-size: .65rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.talent-dialog-header h2 { min-width: 0; margin: 0; font-family: Bungee, sans-serif; font-size: clamp(1.05rem, 2vw, 1.6rem); font-weight: normal; line-height: 1.2; overflow-wrap: anywhere; }
.talent-dialog-close { flex: none; display: grid; width: 40px; height: 40px; padding: 0; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; color: var(--text); background: rgba(255,255,255,.04); cursor: pointer; font-size: 1.4rem; }
.talent-dialog-close:hover { border-color: var(--accent-3, #b48cff); }
.talent-dialog-status { margin: 30px 0; color: var(--quiet); }
.talent-dialog-status[hidden], .talent-dialog-detail[hidden] { display: none; }
.talent-dialog-trees { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.62fr) minmax(0,1fr); align-items: stretch; gap: 14px; margin-top: 28px; }
.talent-tree { min-width: 0; padding: 18px 12px 12px; border: 1px solid rgba(255,255,255,.11); border-radius: 16px; background: radial-gradient(ellipse at 50% 0, rgba(var(--accent-2-rgb),.13), transparent 55%), #17131d; }
.talent-tree-hero { align-self: start; border-color: rgba(var(--accent-3-rgb),.31); }
.talent-tree-header { min-height: 108px; padding: 0 5px; text-align: center; }
.talent-tree-header h3 { margin: 5px 0 1px; font-family: Bungee, sans-serif; font-size: clamp(.9rem, 1.4vw, 1.25rem); font-weight: normal; line-height: 1.2; }
.talent-tree-count { color: var(--quiet); font-size: .7rem; }
.talent-tree-hero.has-hero-emblem .talent-tree-header { display: flex; flex-direction: column; align-items: center; }
.talent-tree-hero.has-hero-emblem .talent-tree-header h3 { margin: 5px 0 1px; }
.talent-tree-hero-emblem { display: grid; flex: none; width: 42px; height: 42px; margin: 6px 0 5px; place-items: center; overflow: hidden; border: 2px solid rgba(var(--accent-3-rgb),.8); border-radius: 50%; background: #21152d; box-shadow: 0 0 0 3px rgba(5,3,8,.8), 0 0 18px rgba(var(--accent-3-rgb),.3); }
.talent-tree-hero-emblem img { width: 100%; height: 100%; object-fit: cover; }
.talent-tree-flow { display: grid; gap: 6px; margin-top: 9px; }
.talent-tier { display: flex; min-width: 0; min-height: 48px; align-items: center; border: 1px solid rgba(255,255,255,.075); border-radius: 10px; background: rgba(255,255,255,.025); }
.talent-tier-talents { display: flex; width: 100%; min-width: 0; padding: 5px 8px 11px; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px 14px; }
.talent-node { position: relative; z-index: 1; display: grid; flex: 0 0 34px; width: 34px; height: 34px; padding: 0; place-items: center; overflow: visible; border: 2px solid #594e67; border-radius: 9px; color: #a899b8; background: #241c2e; box-shadow: 0 2px 9px rgba(0,0,0,.55); cursor: pointer; }
.talent-node.is-choice { border-radius: 50%; }
.talent-node.is-selected { border-color: var(--accent-3, #b48cff); color: #fff; box-shadow: 0 0 0 2px rgba(5,3,8,.88), 0 0 15px rgba(var(--accent-3-rgb),.52); }
.talent-node.is-focused { outline: 2px solid #fff; outline-offset: 3px; }
.talent-node.is-linked { outline: 2px solid var(--accent-3, #b48cff); outline-offset: 3px; box-shadow: 0 0 0 2px rgba(5,3,8,.88), 0 0 22px rgba(var(--accent-3-rgb),.85); }
.talent-node:hover, .talent-node:focus-visible { z-index: 3; outline: 2px solid #fff; outline-offset: 2px; }
.talent-node img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.talent-node-fallback { font-size: 1.05rem; }
.talent-node-rank { position: absolute; right: 0; bottom: -8px; padding: 1px 3px; border: 1px solid rgba(255,255,255,.36); border-radius: 4px; color: #fff; background: #201329; font-size: .55rem; font-weight: 800; line-height: 1; }
.talent-tree-empty { display: grid; min-height: 150px; padding: 24px; place-items: center; color: var(--quiet); font-size: .8rem; text-align: center; }
.talent-dialog-detail { position: fixed; z-index: 15; display: grid; width: min(380px, calc(100vw - 48px)); max-height: min(60dvh, 420px); gap: 5px; margin: 0; padding: 17px 20px; overflow: auto; overscroll-behavior: contain; border: 1px solid rgba(var(--accent-3-rgb),.55); border-radius: 13px; background: #21182a; box-shadow: 0 18px 45px rgba(0,0,0,.68), 0 0 24px rgba(var(--accent-2-rgb),.2); }
.talent-detail-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.talent-detail-close { display: grid; flex: none; width: 22px; height: 22px; padding: 0; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; color: var(--text); background: rgba(255,255,255,.06); cursor: pointer; font: inherit; font-size: 1.05rem; line-height: 1; }
.talent-detail-close:hover, .talent-detail-close:focus-visible { border-color: var(--accent-3, #b48cff); background: rgba(var(--accent-3-rgb),.2); }
.talent-dialog-detail strong { font-size: 1.02rem; }
.talent-dialog-detail p { margin: 0; color: var(--quiet); font-size: .82rem; line-height: 1.5; white-space: pre-line; }
.talent-dialog-detail .talent-detail-links { margin-top: 5px; color: var(--accent-3, #b48cff); }
@media (max-width: 1050px) {
    .talent-dialog { --talent-dialog-height: calc(100dvh - 18px); width: calc(100vw - 18px); border-radius: 16px; }
    .talent-dialog-header { gap: 12px; padding: 10px 12px; }
    .talent-dialog-content { padding: 0 11px 22px; }
    .talent-dialog-trees { grid-template-columns: minmax(0,1fr); gap: 12px; margin-top: 20px; }
    .talent-tree-header { min-height: 0; }
    .talent-tree-header h3 { font-size: 1.12rem; }
    .talent-tier-talents { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .specialisation-trigger::after { transition: none; }
    .talent-card-link, .talent-card-arrow { transition: none; }
}
