/* Skill atlas: native scrolling, readable ranks and four independent paths. */
#skillTreeViewport.skill-atlas {
    --branch: #f6c75d;
    background: radial-gradient(ellipse at 45% 0, #152139 0, transparent 52%), #080e19;
    border: 1px solid #28354b;
    border-radius: 14px;
    position: relative;
    height: 560px;
    min-height: 280px;
    overflow: auto;
    overscroll-behavior: contain;
    touch-action: pan-y pinch-zoom !important;
    scrollbar-gutter: stable;
    color: #e7edf7;
    font-family: Inter, system-ui, sans-serif;
}
.skill-atlas *, .skill-atlas *::before, .skill-atlas *::after { box-sizing: border-box; }
.skill-atlas button { font: inherit; cursor: pointer; }
.skill-atlas button:focus-visible, #skillNodeModal button:focus-visible { outline: 3px solid #f8df8a; outline-offset: 3px; }
.skill-branch-tabs { position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; padding: 12px; background: #0c1422; border-bottom: 1px solid #25334a; }
.skill-branch-tab { min-width: 0; text-align: left; padding: 12px 12px 9px; border: 1px solid #2b3a50; border-radius: 9px; color: #b6c5d9; background: #101b2c; transition: border-color .15s, background .15s; }
.skill-branch-tab > span:first-child { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 12px; }
.skill-branch-tab i { color: var(--branch); }
.skill-branch-tab small { display: block; color: #a5b7cd; font-size: 10px; margin-top: 7px; line-height: 1.5; }
.skill-branch-tab.is-active { background: #192538; border-color: var(--branch); color: #fff; box-shadow: inset 0 2px 0 var(--branch); }
.skill-branch-progress { display: block; height: 3px; background: #27354b; border-radius: 5px; margin-top: 10px; overflow: hidden; }
.skill-branch-progress > span { display: block; height: 100%; background: var(--branch); }
.skill-atlas-body { max-width: 1060px; margin: 0 auto; padding: 24px; }
.skill-atlas-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.skill-eyebrow { display: block; color: var(--branch); font-size: 9px; font-weight: 800; letter-spacing: 1.8px; margin-bottom: 8px; }
.skill-atlas-intro h3 { display: flex; align-items: center; gap: 10px; color: #f5f7fc; font-size: 24px; margin: 0; font-weight: 800; }
.skill-atlas-intro h3 i { color: var(--branch); font-size: 20px; }
.skill-atlas-intro p { color: #a4b5ca; font-size: 12px; line-height: 1.6; margin: 8px 0 0; }
.skill-investment { flex-shrink: 0; text-align: right; }
.skill-investment strong { display: block; color: var(--branch); font-size: 20px; }
.skill-investment span { font-size: 10px; color: #a4b5ca; }
.skill-atlas-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 22px 0 15px; }
.skill-filter-group { display: flex; gap: 3px; padding: 4px; background: #070d16; border: 1px solid #26354b; border-radius: 8px; }
.skill-filter-group button { background: transparent; border: 0; color: #b4c1d3; padding: 8px 12px; border-radius: 5px; font-size: 11px; }
.skill-filter-group button.is-active { background: #26354b; color: #fff; }
.skill-map-hint { color: #9cafc5; font-size: 10px; }
.skill-atlas-tip { display: flex; align-items: center; gap: 10px; padding: 11px 14px; font-size: 11px; line-height: 1.6; color: #a6b7cd; border: 1px dashed #31415a; border-radius: 8px; }
.skill-atlas-tip i { color: var(--branch); font-size: 17px; }
.skill-goal-bar { display: flex; align-items: center; gap: 12px; padding: 14px; background: #192331; border: 1px solid #bda76a; border-radius: 9px; }
.skill-goal-bar > i { color: #f6d578; }
.skill-goal-bar > div { flex: 1; min-width: 0; }
.skill-goal-bar small { display: block; font-size: 8px; color: #f6d578; letter-spacing: 1.4px; }
.skill-goal-bar strong { display: block; font-size: 12px; margin: 4px 0; }
.skill-goal-bar span { display: block; color: #b4c2d5; font-size: 10px; line-height: 1.5; }
.skill-goal-bar button { background: #26354b; border: 1px solid #485871; border-radius: 6px; color: #e8eff9; padding: 9px; font-size: 11px; min-height: 36px; }
.skill-atlas-map { position: relative; padding: 6px 0 10px; }
#skillAtlasEdges { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: visible; }
#skillAtlasEdges path { fill: none; stroke: #435570; stroke-width: 1.4; stroke-dasharray: 5 5; opacity: .5; }
#skillAtlasEdges path.is-active { stroke: var(--branch); stroke-dasharray: none; opacity: .7; }
.skill-atlas-tier { position: relative; margin-top: 28px; }
.skill-tier-title { display: flex; gap: 9px; align-items: center; position: relative; z-index: 1; width: fit-content; background: #0b1320; padding: 3px 8px 3px 0; margin-bottom: 11px; }
.skill-tier-title > span { display: inline-grid; place-items: center; width: 25px; height: 25px; font-size: 10px; color: var(--branch); border: 1px solid #384761; border-radius: 7px; background: #142035; }
.skill-tier-title h4 { margin: 0; color: #b6c5d9; font-size: 10px; font-weight: 650; letter-spacing: .4px; }
.skill-tier-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; align-items: stretch; }
.skill-atlas-card { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 11px; text-align: left; min-width: 0; min-height: 188px; padding: 15px; background: #111d2e; border: 1px solid #34445b; border-radius: 10px; color: #edf2f9; box-shadow: 0 3px 10px #0003; transition: border-color .16s, background .16s; }
.skill-atlas-card:hover { border-color: var(--branch); background: #18263a; }
.skill-atlas-card.is-ready { border-color: var(--branch); box-shadow: inset 0 2px 0 var(--branch), 0 4px 12px #0004; }
.skill-atlas-card.is-maxed { background: #13242b; border-color: #488977; }
.skill-atlas-card.is-locked { background: #0c1523; border-style: dashed; }
.skill-atlas-card.is-path { box-shadow: 0 0 0 1px #aa935744; border-color: #a2936e; }
.skill-atlas-card.is-goal { border-color: #f3d688; box-shadow: 0 0 0 2px #d2b76433; }
.skill-card-top { display: flex; align-items: center; gap: 8px; }
.skill-card-icon { display: inline-grid; place-items: center; width: 31px; height: 31px; background: #203149; color: var(--branch); border-radius: 8px; font-size: 15px; }
.skill-card-rank { color: #d1dceb; font-size: 11px; font-weight: 750; }
.skill-new { margin-left: auto; font-size: 7px; font-weight: 850; letter-spacing: .7px; color: #9be4b8; background: #1b392e; border-radius: 3px; padding: 4px; }
.skill-card-top > .fa-bookmark { color: #f3d688; font-size: 11px; }
.skill-atlas-card > strong { font-size: 12px; font-weight: 750; line-height: 1.45; }
.skill-card-description { display: block; font-size: 10px; line-height: 1.65; color: #aec0d7; flex: 1; }
.skill-rank-dots { display: flex; gap: 4px; }
.skill-rank-dots > span { width: 17px; height: 3px; background: #34445b; border-radius: 4px; }
.skill-rank-dots > .filled { background: var(--branch); }
.skill-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 7px; border-top: 1px solid #293950; padding-top: 10px; }
.skill-card-bottom > span { font-size: 9px; color: #aabbd0; line-height: 1.45; }
.is-ready .skill-card-bottom > span { color: #a8e9c0; }
.is-maxed .skill-card-bottom > span { color: #a8e9c0; }
.skill-card-bottom > b { white-space: nowrap; color: #f4d186; font-size: 11px; }
.skill-atlas-empty { text-align: center; display: grid; justify-items: center; gap: 12px; padding: 45px 20px; color: #b6c5d9; }
.skill-atlas-empty i { font-size: 28px; color: var(--branch); }
.skill-atlas-empty p { font-size: 12px; line-height: 1.7; }
.skill-atlas-empty button { background: #24364c; color: #fff; border: 1px solid #49627f; border-radius: 7px; padding: 10px 16px; }
.skill-atlas-footer { display: flex; flex-wrap: wrap; gap: 15px; color: #9faec3; font-size: 9px; line-height: 1.6; border-top: 1px solid #293950; margin-top: 24px; padding-top: 15px; }
.skill-atlas-footer .fa-circle { color: #9bd4b5; font-size: 7px; }
#skillNodeModal .skill-node-confirm-box { max-width: 540px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px; }
#skillNodeModal .skill-node-icon-circle { width: 52px; height: 52px; margin-bottom: 12px; }
#skillNodeModal .skill-node-icon-circle i { font-size: 23px; }
#skillNodeModal .skill-node-confirm-title { font-size: 19px; }
#skillNodeModal .skill-node-desc-text { line-height: 1.65; }
.skill-node-requirements { text-align: left; font-size: 11px; color: #bdcbe0; margin: 14px 0; }
.skill-node-requirements > strong { font-size: 10px; }
.skill-node-requirements > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.skill-node-requirements button { padding: 7px 9px; background: #132035; border: 1px solid #425574; color: #d9e5f5; border-radius: 6px; font-size: 10px; }
.skill-node-requirements button.is-met { color: #a9e8c2; border-color: #416954; }
.skill-node-preview { border: 1px solid #30415c; border-radius: 8px; background: #0c1523; padding: 12px; text-align: left; }
.skill-node-preview > strong { font-size: 11px; color: #e0eaf7; }
.skill-node-preview > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 11px; color: #b7c7dc; }
.skill-node-preview > div strong { color: #a6e6be; }
.skill-node-preview p, .skill-node-preview small { display: block; margin: 8px 0 0; font-size: 10px; line-height: 1.65; color: #a3b5ce; }
.skill-node-ranks { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.skill-node-ranks span { color: #a9bad1; font-size: 9px; padding: 6px 8px; border: 1px solid #35465e; border-radius: 5px; }
.skill-node-ranks .is-owned { color: #a6e6be; border-color: #416954; }
.skill-node-ranks .is-next { color: #f3d688; border-color: #947c48; }
#btnPinSkillNode { padding: 9px 12px; color: #dac998; background: #242335; border: 1px solid #726341; border-radius: 6px; font: inherit; font-size: 11px; margin: 0 0 12px; width: 100%; }
#btnConfirmSkillNode:disabled { cursor: not-allowed; opacity: .75; }
@media (max-width: 1100px) { .skill-tier-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) {
    #viewBottomSkillTree .skill-tree-window-header { padding: 10px 4px; gap: 8px; }
    #viewBottomSkillTree .skill-tree-window-header h2 { font-size: 12px; }
    #viewBottomSkillTree .header-subtitle { font-size: 10px; }
    #viewBottomSkillTree .badge-skill-tree-meta { display: none; }
    .skill-branch-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding: 9px; }
    .skill-branch-tab { padding: 10px; }
    .skill-branch-tab > span:first-child { font-size: 11px; }
    .skill-atlas-body { padding: 15px 12px; }
    .skill-atlas-intro { gap: 8px; }
    .skill-atlas-intro h3 { font-size: 19px; }
    .skill-atlas-intro p { font-size: 11px; }
    .skill-investment strong { font-size: 15px; }
    .skill-investment span { font-size: 9px; }
    .skill-map-hint { display: none; }
    .skill-filter-group { width: 100%; }
    .skill-filter-group button { flex: 1; padding: 10px 5px; }
    .skill-atlas-tip { font-size: 10px; }
    .skill-tier-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
    .skill-atlas-card { min-height: 0; padding: 14px; gap: 10px; }
    .skill-atlas-card > strong { font-size: 13px; }
    .skill-card-description { font-size: 11px; }
    .skill-card-bottom > span { font-size: 10px; }
    .skill-goal-bar { flex-wrap: wrap; }
    .skill-goal-bar > div { flex-basis: 65%; }
    #skillNodeModal .skill-node-confirm-box { padding: 16px; max-width: calc(100vw - 24px); }
    #skillNodeModal .skill-node-modal-actions { flex-direction: column-reverse; }
    #skillNodeModal .skill-node-modal-actions button { flex: auto; width: 100%; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .skill-atlas * { transition: none !important; scroll-behavior: auto !important; } }
