/* Guide public des compétences — alimenté par SkillTreeData.js. */

html,
body.skills-guide-body {
    min-height: 100%;
    height: auto;
    overflow: visible;
}

body.skills-guide-body {
    --guide-ink: #161418;
    --guide-paper: #f7f7f8;
    color: var(--guide-ink);
    background-color: var(--guide-paper);
    background-image: radial-gradient(rgba(17, 17, 17, 0.17) 1px, transparent 1px);
    background-size: 22px 22px;
}

.skills-guide-footer a {
    color: #111;
    font-weight: 900;
    text-decoration: none;
}

.guide-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    color: #4b4650;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.guide-legend span { display: inline-flex; align-items: center; gap: 6px; }

.status-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    border: 1.5px solid #111;
    border-radius: 50%;
}

.status-dot.is-live { background: #4ade80; }
.status-dot.is-planned { background: #d4d4d8; }

.skills-guide-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(48px, 7vw, 86px) 0 70px;
}

.guide-intro {
    max-width: 830px;
    margin: 0 auto 34px;
    text-align: center;
}

.guide-kicker {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 11px;
    background: #cdb4db;
    border: 2px solid #111;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.guide-intro h1 {
    font-size: clamp(2.2rem, 6vw, 4.8rem);
    font-weight: 1000;
    letter-spacing: -0.065em;
    line-height: 0.95;
}

.guide-intro > p:last-child {
    max-width: 700px;
    margin: 22px auto 0;
    color: #55515a;
    font-size: clamp(0.95rem, 2vw, 1.12rem);
    line-height: 1.7;
}

.stat-formulas {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    max-width: 980px;
    margin: 0 auto 30px;
}

.stat-formulas article {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 11px 13px;
    background: #fff;
    border: 2px solid #111;
    border-radius: 9px;
    box-shadow: 3px 3px 0 #111;
}

.stat-formulas span { color: #666; font-size: 0.62rem; font-weight: 900; text-transform: uppercase; }
.stat-formulas strong { font-size: 0.8rem; }

.class-tabs {
    position: sticky;
    top: 82px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    max-width: 980px;
    margin: 0 auto 16px;
}

.class-tab {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #111;
    background: #fff;
    border: 2.5px solid #111;
    border-radius: 10px;
    box-shadow: 3px 3px 0 #111;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 900;
    text-align: left;
    text-decoration: none;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.class-tab:hover,
.class-tab:focus-visible,
.class-tab.is-active {
    background: var(--class-soft);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #111;
}

.class-tab img,
.class-tab-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    object-fit: contain;
    border-radius: 7px;
    background: var(--class-soft);
}

.skill-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 42px;
}

.skill-filter {
    padding: 7px 13px;
    color: #555;
    background: #fff;
    border: 2px solid #111;
    border-radius: 999px;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 900;
    cursor: pointer;
}

.skill-filter.is-active {
    color: #111;
    background: #a2d2ff;
    box-shadow: 2px 2px 0 #111;
}

.skill-trees { display: grid; gap: 64px; }

.class-section[hidden] { display: none; }

.class-section {
    --class-color: #cdb4db;
    --class-soft: #f3e8ff;
    scroll-margin-top: 155px;
}

.class-hero {
    position: relative;
    min-height: 220px;
    display: grid;
    grid-template-columns: 170px 1fr auto;
    align-items: center;
    gap: 28px;
    padding: 24px 30px;
    overflow: hidden;
    background: var(--class-soft);
    border: 3px solid #111;
    border-radius: 20px 20px 0 0;
    box-shadow: 7px 7px 0 #111;
}

.class-hero::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -90px;
    width: 270px;
    height: 270px;
    border: 45px solid color-mix(in srgb, var(--class-color) 35%, transparent);
    border-radius: 50%;
}

.class-portrait {
    width: 160px;
    height: 180px;
    z-index: 1;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(7px 8px 0 rgba(17, 17, 17, 0.2));
}

.class-copy { position: relative; z-index: 1; }

.class-role {
    display: inline-block;
    margin-bottom: 8px;
    padding: 5px 9px;
    background: #fff;
    border: 2px solid #111;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.class-copy h2 {
    font-size: clamp(1.7rem, 4vw, 3rem);
    font-weight: 1000;
    letter-spacing: -0.055em;
    line-height: 1;
}

.class-copy p {
    max-width: 630px;
    margin-top: 12px;
    color: #4f4853;
    line-height: 1.55;
}

.class-natural-attributes {
    display: grid;
    grid-template-columns: repeat(6, minmax(42px, 1fr));
    gap: 5px;
    max-width: 500px;
    margin-top: 14px;
    list-style: none;
}

.class-natural-attributes li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 5px 7px;
    background: #fff;
    border: 1.5px solid #111;
    border-radius: 6px;
}

.class-natural-attributes span { color: #666; font-size: 0.55rem; font-weight: 900; }
.class-natural-attributes .class-stat-icon { width: 22px; height: 22px; flex: 0 0 auto; }
.class-natural-attributes strong { font-size: 0.76rem; }

.class-count {
    position: relative;
    z-index: 1;
    min-width: 120px;
    padding: 15px;
    background: #fff;
    border: 2.5px solid #111;
    border-radius: 12px;
    box-shadow: 4px 4px 0 #111;
    text-align: center;
}

.class-count strong { display: block; font-size: 2rem; font-weight: 1000; }
.class-count span { color: #666; font-size: 0.68rem; font-weight: 900; text-transform: uppercase; }

.base-skill {
    position: relative;
    margin: 0 18px;
    padding: 22px;
    background: #fff;
    border: 3px solid #111;
    border-top: 0;
    box-shadow: 7px 7px 0 #111;
}

.base-skill::after {
    content: "";
    position: absolute;
    bottom: -31px;
    left: 50%;
    width: 3px;
    height: 31px;
    background: #111;
}

.base-skill.is-hidden { display: none; }

.branches-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 30px;
}

.skill-branch {
    padding: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 2.5px solid #111;
    border-radius: 14px;
    box-shadow: 5px 5px 0 #111;
}

.branch-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    font-size: 0.82rem;
    font-weight: 1000;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.branch-heading::before {
    content: "";
    width: 12px;
    height: 12px;
    background: var(--class-color);
    border: 2px solid #111;
    transform: rotate(45deg);
}

.branch-skills { display: grid; gap: 13px; }

.branch-skill-layer {
    position: relative;
    display: grid;
    isolation: isolate;
    border-radius: 10px;
}

.branch-skill-layer.is-hidden { display: none; }

.branch-skill-layer > .skill-card,
.branch-skill-watermark {
    grid-area: 1 / 1;
}

.branch-skill-watermark {
    z-index: 1;
    justify-self: end;
    align-self: stretch;
    width: auto;
    height: 100%;
    aspect-ratio: 1;
    background-color: var(--class-soft);
    border-radius: 0 8px 8px 0;
    opacity: 0.16;
    pointer-events: none;
}

.branch-skill-watermark:not(.atlas-icon) {
    display: grid;
    place-items: center;
    font-size: clamp(4rem, 8vw, 8rem);
}

.skill-card {
    position: relative;
    min-height: 176px;
    padding: 16px;
    background: #fff;
    border: 2px solid #111;
    border-radius: 10px;
}

.branch-skill-layer > .skill-card > * {
    position: relative;
    z-index: 2;
}

.skill-card[data-status="planned"] {
    background: #f4f4f5;
    border-style: dashed;
}

.skill-card.is-hidden,
.skill-branch.is-hidden { display: none; }

.branch-skill-layer + .branch-skill-layer::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 25px;
    width: 2px;
    height: 13px;
    background: #111;
}

.skill-card-top {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: start;
    gap: 10px;
}

.skill-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--class-soft);
    border: 2px solid #111;
    border-radius: 9px;
    font-size: 1.25rem;
}

.skill-icon.atlas-icon {
    width: 42px;
    height: 42px;
    background-color: var(--class-soft);
}

.skill-title h3 {
    font-size: 0.96rem;
    font-weight: 950;
    line-height: 1.15;
}

.skill-kind {
    display: block;
    margin-top: 4px;
    color: #777;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.skill-status {
    padding: 4px 7px;
    border: 1.5px solid #111;
    border-radius: 999px;
    font-size: 0.57rem;
    font-weight: 950;
    text-transform: uppercase;
    white-space: nowrap;
}

.skill-status.is-live { background: #bbf7d0; }
.skill-status.is-planned { background: #e4e4e7; }

.skill-description {
    margin-top: 12px;
    color: #4e4a50;
    font-size: 0.82rem;
    line-height: 1.52;
}

.skill-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 13px;
    list-style: none;
}

.skill-stats li {
    padding: 4px 7px;
    background: var(--class-soft);
    border: 1.5px solid #111;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 850;
}

.skill-cost {
    margin-top: 11px;
    color: #777;
    font-size: 0.65rem;
    font-weight: 800;
}

.skills-guide-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    padding: 25px 20px;
    background: #fff;
    border-top: 3px solid #111;
    color: #5c5660;
    font-size: 0.78rem;
    text-align: center;
}

.guide-noscript {
    padding: 20px;
    background: #fee2e2;
    border: 2px solid #111;
    text-align: center;
}

@media (max-width: 900px) {
    .class-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); top: 80px; }
    .stat-formulas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .class-hero { grid-template-columns: 115px 1fr; padding: 20px; }
    .class-portrait { width: 110px; height: 145px; }
    .class-count { display: none; }
    .branches-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .skills-guide-main { width: min(100% - 20px, 1180px); padding-top: 38px; }
    .class-tabs { position: static; grid-template-columns: repeat(2, 1fr); }
    .class-tab { padding: 7px; font-size: 0.67rem; }
    .class-tab img,
    .class-tab-icon { width: 32px; height: 32px; }
    .class-hero { min-height: 180px; grid-template-columns: 82px 1fr; gap: 12px; padding: 15px; }
    .class-portrait { width: 78px; height: 120px; }
    .class-copy h2 { font-size: 1.5rem; }
    .class-copy p { font-size: 0.78rem; }
    .class-natural-attributes { grid-template-columns: repeat(3, 1fr); }
    .base-skill { margin: 0 8px; padding: 14px; }
    .skill-branch { padding: 13px; }
    .skill-card-top { grid-template-columns: 38px 1fr; }
    .skill-icon,
    .skill-icon.atlas-icon { width: 38px; height: 38px; }
    .skill-status { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
