#game-expertise-root {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 55;
    --expertise-top-clearance: calc(var(--safe-top) + clamp(92px, 15vh, 118px));
}

#game-expertise-root.open {
    pointer-events: auto;
}

[data-expertise-backdrop] {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: var(--expertise-top-clearance);
    background: rgba(0, 0, 0, 0.62);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

#game-expertise-root.open [data-expertise-backdrop] {
    opacity: 1;
    pointer-events: auto;
}

.game-expertise-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: var(--expertise-top-clearance);
    padding: 10px 12px calc(8px + var(--safe-bottom));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.28s ease-out;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, #2a2118 0%, #1a1410 100%);
    pointer-events: auto;
}

#game-expertise-root.open .game-expertise-panel {
    transform: translateY(0);
}

.game-expertise-panel .inv-header-row {
    margin-bottom: 4px;
    gap: 8px;
}

.game-expertise-subtitle {
    margin: 0 0 10px;
    font-size: 0.78rem;
    color: #a89880;
    flex-shrink: 0;
}

[data-expertise-body] {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: pan-y;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
}

.expertise-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.expertise-row {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(180, 150, 100, 0.22);
}

.expertise-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 2px;
}

.expertise-name {
    font-size: 0.86rem;
    color: #f0e6d4;
    font-weight: 600;
}

.expertise-level {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: #e8c878;
    font-variant-numeric: tabular-nums;
}

.expertise-how {
    margin: 0 0 8px;
    font-size: 0.7rem;
    color: #9a8a72;
}

.expertise-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.expertise-bar {
    flex: 1;
    min-width: 0;
    height: 10px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(160, 130, 80, 0.35);
    overflow: hidden;
}

.expertise-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, #6a9a48 0%, #a8d068 100%);
    transition: width 0.2s ease-out;
}

.expertise-bar-meta {
    flex-shrink: 0;
    min-width: 4.5em;
    text-align: right;
    font-size: 0.68rem;
    color: #b8a888;
    font-variant-numeric: tabular-nums;
}
