.card-choice-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(7, 10, 20, 0.72);
}

.card-choice-modal {
    width: min(920px, 96vw);
    max-height: 92vh;
    overflow-y: auto;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.96);
    color: #111827;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.card-choice-title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    color: #111827;
}

.card-choice-description {
    margin: 0 0 14px;
    color: #374151;
    line-height: 1.5;
}

.card-choice-status {
    margin-bottom: 14px;
    font-weight: 700;
    color: #4b5563;
}

.card-choice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
    justify-content: center;
}

.card-choice-grid.has-sections {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 18px;
}

.card-choice-section {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(17, 24, 39, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.58);
    box-sizing: border-box;
}

.card-choice-section-header {
    margin-bottom: 6px;
    font-size: 0.98rem;
    font-weight: 800;
    color: #111827;
}

.card-choice-section-description {
    margin: 0 0 10px;
    color: #4b5563;
    font-size: 0.84rem;
    line-height: 1.45;
}

.card-choice-section-cards,
.card-choice-place-stacks {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-start;
}

.card-choice-place-stack {
    min-width: 124px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(17, 24, 39, 0.06);
    border: 1px solid rgba(17, 24, 39, 0.10);
}

.card-choice-place-stack-header {
    margin-bottom: 7px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #374151;
}

.card-choice-place-stack-cards {
    --card-choice-stack-width: 96px;
    position: relative;
    width: var(--card-choice-stack-width);
    min-height: 146px;
}

.card-choice-place-stack-card {
    position: absolute;
    top: 0;
    left: var(--card-choice-card-offset-x, 0px);
    z-index: var(--card-choice-card-z, 1);
}

.card-choice-place-stack-card:hover {
    z-index: 50;
}

.card-choice-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 18px;
    align-items: flex-start;
}

.card-choice-detail {
    position: sticky;
    top: 0;
    min-height: 240px;
    padding: 14px;
    border: 1px solid rgba(17, 24, 39, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.card-choice-detail.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.card-choice-detail-empty {
    margin: 0;
    line-height: 1.5;
    text-align: center;
}

.card-choice-detail-name {
    margin: 0 0 8px;
    font-size: 1.2rem;
    color: #111827;
}

.card-choice-detail-meta {
    margin-bottom: 12px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #4b5563;
}

.card-choice-detail-section {
    padding-top: 10px;
    border-top: 1px solid rgba(17, 24, 39, 0.1);
}

.card-choice-detail-section + .card-choice-detail-section {
    margin-top: 10px;
}

.card-choice-detail-section h4 {
    margin: 0 0 6px;
    font-size: 0.82rem;
    color: #1f2937;
}

.card-choice-detail-section p {
    margin: 0;
    color: #374151;
    font-size: 0.88rem;
    line-height: 1.55;
}

.card-choice-detail-section.fusion-lines p {
    white-space: pre-line;
}

.card-choice-card {
    position: relative;
    padding: 6px;
    border: 3px solid transparent;
    border-radius: 10px;
    background: rgba(17, 24, 39, 0.06);
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.card-choice-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.55);
}

.card-choice-card.is-disabled {
    opacity: 0.36;
    filter: grayscale(0.75);
    cursor: default;
}

.card-choice-card.is-disabled:hover {
    transform: none;
    border-color: transparent;
}

.card-choice-card.selected {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.card-choice-order-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
    pointer-events: none;
}

.card-choice-order-badge.hidden {
    display: none;
}

.card-choice-actions,
.card-choice-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 18px;
}

.card-choice-primary,
.card-choice-secondary {
    min-width: 140px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.card-choice-primary {
    background: #2563eb;
    color: #fff;
}

.card-choice-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.card-choice-secondary {
    background: #e5e7eb;
    color: #111827;
}

.card-choice-confirm {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    background: #fffbeb;
}

.card-choice-confirm.hidden {
    display: none;
}

.card-choice-confirm-message {
    margin: 0;
    color: #111827;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .card-choice-layout {
        grid-template-columns: 1fr;
    }

    .card-choice-detail {
        position: static;
        min-height: 0;
    }
}
