/* Companion selection only: keep board artwork and in-game unit cards local. */
#cast-picker.game-cast-portraits,
#cast-options.game-cast-portraits,
.game-cast-select .game-cast-portraits {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 4px 2px 8px;
    margin: 6px 0;
    scrollbar-width: none;
}
#cast-picker.game-cast-portraits::-webkit-scrollbar,
#cast-options.game-cast-portraits::-webkit-scrollbar,
.game-cast-select .game-cast-portraits::-webkit-scrollbar { display: none; }
#cast-picker.game-cast-portraits[hidden],
#cast-options.game-cast-portraits[hidden],
.game-cast-control [hidden] { display: none !important; }
#cast-picker.game-cast-portraits > button,
#cast-options.game-cast-portraits > button,
.game-cast-select .game-cast-portraits > button {
    position: relative;
    display: block;
    flex: 0 0 72px;
    box-sizing: border-box;
    width: 72px;
    min-width: 72px;
    height: 96px;
    min-height: 44px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background: #6e626a;
    box-shadow: none;
    transform: none;
    transition: none;
    touch-action: manipulation;
}
#cast-picker.game-cast-portraits > button::after,
#cast-options.game-cast-portraits > button::after { display: none; }
#cast-picker.game-cast-portraits > button > img,
#cast-options.game-cast-portraits > button > img,
.game-cast-select .game-cast-portraits > button > img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
    border-radius: inherit;
    transform: none;
    filter: none;
}
.game-cast-portraits .game-cast-name {
    position: absolute;
    inset: auto 4px 4px;
    box-sizing: border-box;
    margin: 0;
    padding: 4px 2px;
    border-radius: 5px;
    background: rgba(42, 35, 40, .4);
    color: #fff;
    font-family: inherit;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 2px #0006;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.game-cast-portraits > button[aria-pressed="true"] .game-cast-name {
    background: rgba(255, 255, 255, .94);
    color: #2a2328;
    font-weight: 700;
    text-shadow: none;
}
.game-cast-portraits > button:focus-visible { outline: 2px solid #a77991; outline-offset: 2px; }
.game-cast-control { min-width: 0; }
.game-cast-select { min-width: 0; width: 100%; text-align: left; }
.game-cast-select > summary {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    box-sizing: border-box;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #2a2328;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    list-style: none;
}
.game-cast-select > summary::-webkit-details-marker { display: none; }
.game-cast-select > summary::after { content: '⌄'; margin-left: auto; }
.game-cast-select[aria-disabled="true"] > summary { opacity: .55; cursor: default; }
.game-cast-select > summary:focus-visible { outline: 2px solid #a77991; outline-offset: 2px; }
.game-cast-select .game-cast-portraits { max-width: 100%; }
@media (prefers-reduced-motion: reduce) {
    .game-cast-name { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
