/* ── Mobile-first app shell (top bar + scrollable content + bottom nav) ── */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #F2E8D4; /* parchment - matches MudTheme Background */
}

/* Base shell frame - both heads. #app fills its parent; the app-shell lays out inside it. */
#app {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.app-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.app-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 12px 0 16px;
    background: #7E241D; /* lacquer red */
    color: #F1DCA0;      /* gold */
    border-bottom: 2px solid #C9A24B; /* gilt trim */
    font-size: 1.05rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    z-index: 10;
}

.app-bar-title {
    color: #F1DCA0;
    text-decoration: none;
    font-weight: 600;
}

.app-bar-actions {
    display: flex;
    gap: 2px;
}

.app-bar-icon {
    color: #F1DCA0;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    text-decoration: none;
}

.app-bar-icon:hover {
    background: rgba(241, 220, 160, 0.18);
}

.app-content {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 12px 88px; /* bottom padding clears the fixed bottom nav */
}

/* ── Bottom navigation ── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #777;
    text-decoration: none;
    font-size: 0.7rem;
}

.nav-tab .nav-icon {
    width: 24px;
    height: 24px;
    display: block;
}

.nav-tab.active {
    color: #B83227;
    font-weight: 600;
}

.nav-tab:hover {
    color: #B83227;
}

/* ── List items (favorites / search results) ── */
.fav-list {
    display: flex;
    flex-direction: column;
}

.fav-item {
    display: block;
    padding: 9px 6px;
    border-bottom: 1px solid #ececec;
    color: #333;
    text-decoration: none;
}

    .fav-item:hover {
        background: #f0f0f5;
    }

    .fav-item small {
        margin-left: 6px;
    }

.render-error {
    padding: 12px;
    background: #fff3f3;
    border: 1px solid #e50000;
    border-radius: 6px;
}

.render-error pre {
    white-space: pre-wrap;
    font-size: 11px;
    max-height: 300px;
    overflow: auto;
}

/* ── Image tiles ── */
.img-tile { display: block; border-radius: 8px; object-fit: cover; }

.img-ph {
    background: #e0e0e6;
    color: #9aa0ac;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 600;
}

.img-portrait { width: 120px; height: 120px; font-size: 2.4rem; flex: 0 0 auto; }
.img-thumb { width: 36px; height: 36px; font-size: 1rem; flex: 0 0 auto; object-fit: contain; }
.img-icon { width: 44px; height: 44px; font-size: 1.1rem; flex: 0 0 auto; object-fit: contain; }
.img-skill { width: 64px; height: 64px; font-size: 1.1rem; flex: 0 0 auto; object-fit: contain; }
.img-map { width: 100%; max-width: 520px; height: auto; aspect-ratio: 4 / 3; }

/* General body sprites aren't square (e.g. 48x81) - img-portrait/img-thumb stretch them with the
   browser's default object-fit:fill, so generals get their own contain-fit, taller-box classes. */
.img-general-portrait {
    max-width: 110px;
    min-width: 80px;
    max-height: 150px;
    font-size: 2.4rem;
    flex: 0 0 auto;
    object-fit: contain;
}
.img-general-thumb { width: 36px; height: 48px; font-size: 1rem; flex: 0 0 auto; object-fit: contain; }

/* ── NPC "stage" (portrait standing on the ground-ring graphic, GeneralDetail) ──
   Sprite bottom (feet) lands inside the ellipse's lower-middle, not below it: circle bottom
   edge sits at stage-bottom - 8px, ~67px tall, so its body spans roughly 100..167px from the
   stage top (out of 175px) - the sprite box bottom is pinned to 137px to land in that range. */
.npc-stage {
    position: relative;
    min-width: 105px;
    height: 175px;
    flex: 0 0 auto;
}
.npc-stage-circle {
    position: absolute;
    left: 50%;
    bottom: 15%;
    width: 100px;
    height: auto;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
}
.npc-stage-sprite {
    position: absolute;
    left: 50%;
    bottom: 48px;
    transform: translateX(-50%);
    z-index: 1;
}

/* ── General detail hero: [portrait + identity/facts/chart] on the left, skills on the right ──
   Flex-wraps so on a narrow phone the skills column drops below the portrait group instead of
   cramping. Replaces the old portrait-header + stacked MudCards that left a big empty band. */
.gd-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px 28px;
}
/* portrait + meta grouped; the sprite sits vertically centred beside the meta column */
.gd-hero-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 0 1 auto;
}
.gd-portrait { flex: 0 0 auto; }
.gd-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 220px;
    min-width: 0;
}
.gd-identity { display: flex; align-items: center; gap: 12px; }
.gd-facts {
    display: grid;
    grid-template-columns: auto auto;
    gap: 2px 18px;
    justify-content: start;
    font-size: .9rem;
    color: #444;
}
/* sprite + hex chart sit side-by-side on one row; wrap to stacked when too narrow */
.gd-visual {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 12px;
}
.gd-chart { display: flex; justify-content: center; margin-top: 2px; }
/* stretch to the full hero-row height and centre the skill rows vertically, so a 3-skill and a
   5-skill general both sit centred beside the portrait/chart group */
.gd-skills {
    flex: 1 1 320px;
    min-width: 260px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
/* skill icon + optional corner badge (特 special / 被 passive); the badge overlays the icon so
   the special/passive rows flow continuously with the others (no extra blank line) */
.skill-icon-wrap { position: relative; flex: 0 0 auto; }
.skill-marker {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 3px;
    border-radius: 10px;
    background: #d11;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
    pointer-events: none;
}
/* combo (合擊 / fightWay==1) tag shown beside a skill's max level */
.skill-combo-tag { color: #d11; font-weight: 700; font-size: .95rem; }

/* ── Element badge (colored circle + rebirth-tier ring overlay, GeneralDetail header) ── */
.element-badge {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.element-badge-text {
    position: relative;
    z-index: 1;
    color: #fff;
    font-weight: bold;
    font-size: 0.8rem;
    text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.element-badge-ring {
    position: absolute;
    inset: -0px;
    width: calc(100% + 0px);
    height: calc(100% + 0px);
    pointer-events: none;
}

/* ── Hexagon stat chart (GeneralDetail "Chỉ số") ── */
.hex-chart { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.hex-grid-ring { fill: none; stroke: #d8dadf; stroke-width: 1; }
.hex-axis-line { stroke: #d8dadf; stroke-width: 1; }
.hex-data-poly { fill: rgba(13, 110, 253, .25); stroke: #0d6efd; stroke-width: 2; }
.hex-data-dot { fill: #0d6efd; }
.hex-axis-label { font-size: 11px; font-weight: 600; fill: #495057; }
.hex-axis-value { font-size: 11px; font-weight: 400; fill: #6c757d; }

/* ── Decorative double border frame around the character sheet (GeneralDetail) ── */
.game-frame-outer {
    border-style: solid;
    border-width: 6px;
    border-image-source: url('../img/sprite/outer_border.png');
    border-image-slice: 6;
    border-image-repeat: stretch;
    border-radius: 12px;
    max-width: 875px;
}
.game-frame-inner {
    border-style: solid;
    border-width: 8px;
    border-image-source: url('../img/sprite/inner_border.png');
    border-image-slice: 10;
    border-image-repeat: stretch;
    background: #fff;
    padding: 10px;
}

/* ── Detailed walkable map (Ground.mmg grid + entity overlay) ── */
/* scroll/pan container; the map inside grows past it when zoomed */
.mapgrid-viewport {
    width: 100%;
    max-width: 640px;
    max-height: 75vh;
    margin-top: 8px;
    overflow: auto;
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

.mapgrid-wrap {
    position: relative;
    width: 100%;                  /* overridden inline by the zoom level */
    background: #1e1e22;          /* shows through transparent obstacle/wall cells */
    border-radius: 8px;
}

.mapgrid-img {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;   /* crisp 1px-per-block scaling */
}

/* a single scene placed inside the (possibly stitched) shared space */
.mapgrid-tile {
    position: absolute;
    width: auto;
    height: auto;
}

.mapdot {
    position: absolute;
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;    /* centre on the cell */
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .55);
    pointer-events: auto;
    cursor: pointer;
    z-index: 5;                   /* above the dismiss backdrop so dots stay tappable */
}

/* full-cover dismiss layer behind the popover; taps that miss a dot close the popover */
.mapdot-backdrop {
    position: absolute;
    inset: 0;
    z-index: 4;
}

/* tap popover: name/coords + a "view detail" action, anchored at the tapped dot. Opens downward
   (translateY > 0) so it is not clipped by the scroll viewport when the dot sits near the top. */
.mapdot-pop {
    position: absolute;
    z-index: 6;
    transform: translate(-50%, 10px);
    width: max-content;
    max-width: 220px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--mud-palette-surface, #2a2a2e);
    color: var(--mud-palette-text-primary, #fff);
    border: 1px solid rgba(255, 255, 255, .15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
    font-size: .8rem;
}

.mapdot-pop-title { font-weight: 600; line-height: 1.3; white-space: normal; }

.mapdot.dot-npc    { background: #ffd11a; }   /* talk / area NPC */
.mapdot.dot-mob    { background: #ff5a52; }   /* monster / ambient spawn */
.mapdot.dot-hidden { background: #9aa0ac; }   /* hidden or quest-only spawn */
.mapdot.dot-item   { background: #36c2ff; border-radius: 2px; }   /* ground item */
.mapdot.dot-door   { background: #ffffff; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.7); }   /* door / portal */

.mapgrid-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
    font-size: .8rem;
    color: var(--mud-palette-text-secondary, #9aa0ac);
}

.mapgrid-legend span { display: inline-flex; align-items: center; gap: 4px; }
.mapgrid-legend i {
    width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}

/* ── Dẫn đường (route timeline) ── */
.nav-timeline { position: relative; }

.nav-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-left: 4px;
}

/* vertical connector running through the number nodes */
.nav-step::before {
    content: "";
    position: absolute;
    left: 17px;                 /* centre of the 26px node */
    top: 26px;
    bottom: -2px;
    width: 2px;
    background: var(--mud-palette-lines-default, #E2D6BC);
}
.nav-step.is-last::before { display: none; }

.nav-node {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    background: var(--mud-palette-surface, #FCF8F0);
    color: var(--mud-palette-text-secondary, #6E6657);
    border: 2px solid var(--mud-palette-lines-default, #E2D6BC);
    z-index: 1;
}
.nav-node.node-start { border-color: var(--mud-palette-success, #3E7C66); color: var(--mud-palette-success, #3E7C66); }
.nav-node.node-dest  { border-color: var(--mud-palette-secondary, #B83227); color: var(--mud-palette-secondary, #B83227); background: #fbeceb; }

.nav-step-body { flex: 1 1 auto; padding-bottom: 10px; min-width: 0; }
.nav-step-sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: .82rem;
    color: var(--mud-palette-text-secondary, #6E6657);
    margin-top: 2px;
}

.nav-legmap { margin: 0 0 12px 38px; }
.nav-legmap-note {
    margin: 0 0 12px 38px;
    font-size: .82rem;
    color: var(--mud-palette-text-secondary, #6E6657);
}
.nav-legmap-legend {
    display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px;
    font-size: .78rem; color: var(--mud-palette-text-secondary, #9aa0ac);
}
.nav-legmap-legend span { display: inline-flex; align-items: center; gap: 4px; }
.nav-legmap-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* the door-to-door path drawn over a leg's map grid */
.navline-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.navline {
    stroke: #ffd11a;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-dasharray: 3 2.2;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 1px rgba(0,0,0,.8));
}

.mapdot.navdot-in, .nav-legmap-legend i.navdot-in {
    background: #36c2ff; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(0,0,0,.65);
}
.mapdot.navdot-out, .nav-legmap-legend i.navdot-out {
    background: #ff5a52; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(0,0,0,.65);
}
.mapdot.navdot-in, .mapdot.navdot-out { width: 12px; height: 12px; margin: -6px 0 0 -6px; z-index: 4; }

/* ── Blazor error UI (kept from template) ── */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.status-bar-safe-area { display: none; }

@supports (-webkit-touch-callout: none) {
    .status-bar-safe-area {
        display: flex;
        position: sticky;
        top: 0;
        height: env(safe-area-inset-top);
        background-color: #7E241D;
        width: 100%;
        z-index: 1;
    }
}

/* ── Compare page (/compare): overlaid hexachart + stat table + side-by-side skills ── */
/* selected-general chips; the color swatch ties each general to its chart polygon / legend */
.cmp-slots { display: flex; flex-wrap: wrap; gap: 10px; }
.cmp-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid #d8dadf;
    border-left-width: 4px;
    border-radius: 8px;
    background: #fff;
}
.cmp-swatch { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }
.cmp-slot-meta { display: flex; flex-direction: column; line-height: 1.25; }
.cmp-slot-meta small { font-size: .78rem; }

/* legend under the chart: color dot + general name */
.cmp-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 6px; }
.cmp-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 600; }
.cmp-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* numeric stat table - best value per row highlighted */
.cmp-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cmp-table th, .cmp-table td { padding: 6px 12px; text-align: center; border-bottom: 1px solid #eceef1; white-space: nowrap; }
.cmp-table th:first-child, .cmp-table td.cmp-row-label { text-align: left; color: #6c757d; font-weight: 600; }
.cmp-best { background: rgba(201, 162, 75, .22); font-weight: 700; border-radius: 4px; }

/* skills laid out in one column per general; scrolls horizontally on narrow phones */
.cmp-skills { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 4px; }
.cmp-skill-col { flex: 1 0 240px; min-width: 240px; }
.cmp-skill-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 6px;
    margin-bottom: 8px;
    border-bottom: 2px solid #d8dadf;
}

/* ── Bãi train / battle encounters (FightGroupList) ── */
.bt-monster {
    padding: 8px 0;
    border-bottom: 1px solid #E8DDC4;
}
.bt-monster:last-child { border-bottom: 0; }
.bt-mon-head { font-size: 1rem; margin-bottom: 3px; }
.bt-meta { color: #6E6657; font-size: .82rem; margin-left: 6px; }
.bt-line { font-size: .86rem; line-height: 1.7; margin-top: 2px; }
.bt-label { color: #6E6657; margin-right: 6px; }
.bt-variant {
    display: inline-block;
    background: rgba(201, 162, 75, .18);
    border: 1px solid #D8C18A;
    border-radius: 6px;
    padding: 0 6px;
    margin: 0 4px 4px 0;
    font-weight: 600;
    white-space: nowrap;
}
.bt-pos { color: #7E241D; font-weight: 600; margin-left: 3px; }
.bt-spawn-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .86rem;
    margin: 3px 0;
}
.bt-spawn {
    display: inline-block;
    background: #FBF6EA;
    border: 1px solid #E2D6BC;
    border-radius: 6px;
    padding: 1px 7px;
    color: #4A4438;
    white-space: nowrap;
}
.bt-arrow { color: #9C6F1E; font-weight: 700; }

/* ── Home feature-card sprite icons (data-export/images/sprite) ── */
.home-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast; /* keep pixel art crisp when scaled */
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}
.home-card {
    padding: 5px;
}

/* ── Skill Simulator (Tu Luyện) - cây kỹ năng theo UISkillTree.lua ── */
.sk-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.sk-tab {
    border: 1px solid rgba(255,255,255,0.22);
    background: transparent; color: inherit;
    border-radius: 16px; padding: 4px 12px; font-size: 0.85rem; cursor: pointer;
}
.sk-tab.active { background: var(--mud-palette-primary, #5b8def); color: #fff; border-color: transparent; }
.sk-tab.locked { opacity: 0.4; cursor: not-allowed; }
.sk-tab-lock { margin-left: 4px; font-size: 0.75rem; }

.sk-canvas-wrap { overflow-x: auto; }
.sk-canvas {
    position: relative; width: 100%; min-width: 470px; max-width: 620px; height: 380px;
    margin: 0 auto;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
}
.sk-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sk-lines polyline { fill: none; stroke: rgba(255,255,255,0.42); stroke-width: 0.7; }
.sk-lines polyline.on { stroke: var(--mud-palette-success, #46a046); stroke-width: 1; }

.sk-mindgrid { display: flex; flex-wrap: wrap; gap: 12px; }
.sk-mindgrid .sk-node { position: relative; transform: none; }

/* compact square icon node */
.sk-node {
    position: absolute; transform: translate(-50%, -50%); z-index: 3;
    width: 44px; height: 44px; border-radius: 8px; cursor: pointer; user-select: none;
    border: 2px solid rgba(255,255,255,0.22); background: #1f242e;
    display: flex; align-items: center; justify-content: center;
}
.sk-node .sk-ic {
    width: 100%; height: 100%; border-radius: 6px; object-fit: cover;
    filter: grayscale(0.85) brightness(0.62);
    image-rendering: -webkit-optimize-contrast;
}
.sk-node .sk-badge {
    position: absolute; right: -6px; bottom: -6px;
    min-width: 17px; height: 17px; line-height: 15px; padding: 0 3px;
    border-radius: 9px; background: #1b5e20; border: 1px solid #cfe8cf;
    color: #fff; font-size: 0.68rem; font-weight: 700; text-align: center;
}
.sk-node .sk-plus { font-size: 1.3rem; color: #cdb6e6; font-weight: 700; }

.sk-node.learned .sk-ic, .sk-node.granted .sk-ic, .sk-node.maxed .sk-ic { filter: none; }
.sk-node.avail:hover { border-color: #7aa2ff; }
.sk-node.learned { border-color: #46a046; box-shadow: 0 0 5px rgba(70,160,70,0.4); }
.sk-node.maxed { border-color: #d4af00; box-shadow: 0 0 6px rgba(212,175,0,0.5); }
.sk-node.granted { border-color: #46a046; cursor: default; }
.sk-node.prereq { opacity: 0.55; }
.sk-node.locked { opacity: 0.4; cursor: not-allowed; border-color: #7a4a4a; }
.sk-node.summon { opacity: 0.6; cursor: default; border-style: dashed; }
.sk-node.heroempty { background: rgba(160,110,200,0.12); border: 2px dashed #9a6ec8; }
.sk-node.heroempty:hover { border-color: #c39ae6; background: rgba(160,110,200,0.2); }
.sk-node.sel { outline: 2px solid #ffd24a; outline-offset: 1px; }

.sk-ic-lg {
    width: 46px; height: 46px; border-radius: 8px; flex: 0 0 auto;
    image-rendering: -webkit-optimize-contrast;
}

/* Thiên châu (ball) dots on Nhị chuyển connections */
.sk-ball {
    position: absolute; transform: translate(-50%, -50%);
    width: 12px; height: 12px; border-radius: 50%;
    border: 1.5px solid #b06ad0; background: rgba(176,106,208,0.15);
    box-shadow: 0 0 3px rgba(176,106,208,0.5); pointer-events: none; z-index: 2;
}
.sk-ball.on { background: #c060e0; box-shadow: 0 0 6px #c060e0; }

/* Hero-skill picker (Nhị chuyển) - one icon row per element, like the in-game UISkillTree */
.sk-picker { display: flex; flex-direction: column; gap: 8px; }
.sk-picker-row { display: flex; flex-direction: column; gap: 4px; }
.sk-picker-head { display: flex; align-items: center; gap: 6px; }
.sk-picker-head .pi-mul { font-size: 0.72rem; opacity: 0.7; }
.sk-hero-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.sk-hero-ic {
    position: relative; width: 44px; height: 44px; padding: 0;
    border: 1px solid #9a6ec8; border-radius: 6px; overflow: hidden;
    background: rgba(160,110,200,0.12); cursor: pointer;
}
.sk-hero-ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sk-hero-ic .img-ph { width: 100%; height: 100%; border-radius: 6px; }
.sk-hero-ic:hover { border-color: #c39ae6; }
.sk-hero-ic.dis { opacity: 0.4; }
.sk-hero-ic.assigned { border-color: #46a046; box-shadow: 0 0 5px rgba(70,160,70,0.4); }
.sk-hero-cost {
    position: absolute; right: 1px; bottom: 1px;
    background: rgba(0,0,0,0.7); color: #ffd24a;
    font-size: 0.6rem; font-weight: 700; padding: 0 3px; border-radius: 4px; line-height: 1.35;
}
.sk-hero-tick {
    position: absolute; left: 1px; top: 1px;
    background: #46a046; color: #fff;
    font-size: 0.62rem; font-weight: 700; padding: 0 3px; border-radius: 4px; line-height: 1.35;
}
