/* The skill picker rolls out of the bottom control row into the center, in the current theme. */
.combat-launcher,
#battleSkillPicker .picker-heading {
    touch-action: pan-x;
    user-select: none;
}
#battleSkillPicker .picker-heading::before {
    content: '';
    width: 30px;
    height: 3px;
    border-radius: 3px;
    background: var(--muted);
    opacity: 0.55;
    pointer-events: none;
}
#battleSkillPicker,
#combatEffectDialog {
    width: min(420px, calc(100% - 24px));
    max-height: calc(100dvh - 32px);
    padding: 8px 12px 14px;
    background: var(--battle-background);
    border-color: var(--line);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgb(0 0 0 / 14%);
    transform-origin: 50% 100%;
    transform: translateY(calc(50dvh + 50%)) scaleY(0.94);
    opacity: 0;
    transition:
        transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 240ms ease,
        overlay 300ms allow-discrete,
        display 300ms allow-discrete;
}
#battleSkillPicker[open],
#combatEffectDialog[open] {
    transform: translateY(0) scaleY(1);
    opacity: 1;
}
#battleSkillPicker[open] {
    transform: translateY(var(--skill-panel-shift, 0px)) scaleY(1);
}
#battleSkillPicker .picker-heading {
    position: relative;
    min-height: 44px;
    margin-bottom: 4px;
}
#battleSkillPicker .picker-heading::before {
    position: absolute;
    left: calc(50% - 15px);
    top: 12px;
}
#battleSkillPicker .picker-heading button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
#battleSkillPicker .picker-heading button:focus-visible {
    outline: 1px solid var(--muted);
    outline-offset: 1px;
}
#battleSkillPicker .picker-heading svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@starting-style {
    #battleSkillPicker[open],
    #combatEffectDialog[open] {
        transform: translateY(calc(50dvh + 50%)) scaleY(0.94);
        opacity: 0;
    }
}
.battle-panel-content {
    position: relative;
    min-width: 0;
}

#skillPanelEditor {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--battle-text);
    overflow: hidden;
    transform: none;
    transition: none;
}
#skillPanelEditor::backdrop {
    background: rgb(0 0 0 / 65%);
}
.skill-panel-editor-tools {
    position: absolute;
    display: block;
    left: 50%;
    width: min(420px, calc(100% - 24px));
    transform: translateX(-50%);
    z-index: 1;
    max-height: 30dvh;
    overflow: auto;
    padding: 10px;
    border-radius: 12px;
    background: var(--battle-background);
}
.skill-panel-editor-tools h2 {
    font-size: 20px;
    margin: 0 0 6px;
}
.skill-panel-editor-tools p {
    font-size: 14px;
    margin: 0 0 8px;
}
.skill-panel-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.skill-panel-editor-actions button {
    flex: 1;
    margin: 0;
    padding: 8px;
}
.skill-panel-preview {
    position: absolute;
    inset: 0;
    width: min(420px, calc(100% - 24px));
    height: max-content;
    max-height: calc(100dvh - 32px);
    padding: 8px 12px 14px;
    transform: translateY(var(--skill-panel-shift, 0px));
    touch-action: none;
    user-select: none;
    cursor: ns-resize;
    overflow-y: auto;
}
.skill-panel-preview .picker-heading {
    min-height: 44px;
    justify-content: center;
    margin-bottom: 4px;
}
.skill-panel-preview .combat-skills {
    pointer-events: none;
}
.skill-panel-preview button:disabled {
    opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
    #battleSkillPicker,
    #combatEffectDialog {
        transition: none;
    }
}
