.ai3d-upload {
    /* AI3D_BUTTON_VISIBILITY_GUARD */
    position: relative;
    margin-top: 10px;
    border: 2px dashed rgba(246, 202, 92, 0.72);
    border-radius: 10px;
    background:
        radial-gradient(circle at 50% 0%, rgba(246, 202, 92, 0.16), transparent 42%),
        #10141d;
    min-height: 172px;
    display: block;
    padding: 16px;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(246, 202, 92, 0.26), 0 18px 36px rgba(0, 0, 0, 0.24);
}

.ai3d-upload input[type=file] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    opacity: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
}

.ai3d-upload-panel {
    width: 100%;
}

.ai3d-upload:focus-within {
    border-color: rgba(255, 224, 132, 0.92);
    box-shadow:
        inset 0 0 0 1px rgba(246, 202, 92, 0.36),
        0 0 0 3px rgba(246, 202, 92, 0.2),
        0 18px 36px rgba(0, 0, 0, 0.28);
}

.ai3d-upload-empty {
    min-height: 138px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ai3d-upload-single,
.ai3d-upload-multi {
    display: none;
}

.ai3d-upload.has-single .ai3d-upload-empty,
.ai3d-upload.has-multi .ai3d-upload-empty {
    display: none;
}

.ai3d-upload.has-single .ai3d-upload-single {
    display: block;
}

.ai3d-upload.has-multi .ai3d-upload-multi {
    display: block;
}

.ai3d-upload-single-media {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

.ai3d-upload-progress {
    --ai3d-upload-progress: 0%;
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
}

.ai3d-upload-progress[hidden] {
    display: none !important;
}

.ai3d-upload-progress::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(7, 10, 18, 0.46);
}

.ai3d-upload-progress-fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--ai3d-upload-progress);
    background:
        linear-gradient(180deg, rgba(255, 220, 130, 0.2), rgba(246, 202, 92, 0.82)),
        linear-gradient(180deg, rgba(246, 202, 92, 0.94), rgba(214, 158, 30, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 247, 214, 0.28);
    transition: height 0.12s linear;
}

.ai3d-upload-progress-text {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255, 239, 194, 0.36);
    border-radius: 999px;
    background: rgba(10, 14, 22, 0.68);
    color: #fff6dd;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.ai3d-upload-single-actions {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(180deg, rgba(6, 9, 16, 0.12), rgba(6, 9, 16, 0.58));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, background 0.18s ease;
}

.ai3d-upload-single-media:hover .ai3d-upload-single-actions,
.ai3d-upload-single-media:focus-within .ai3d-upload-single-actions {
    opacity: 1;
    pointer-events: auto;
}

.ai3d-upload-single-media.is-uploading .ai3d-upload-single-actions {
    opacity: 0;
    pointer-events: none;
}

.ai3d-upload-single-action-btn,
.ai3d-upload-single-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(232, 109, 135, 0.24);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(72, 34, 42, 0.96), rgba(47, 19, 27, 0.96));
    color: #ffe1e7;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.ai3d-upload-single-action-btn {
    border: 1px solid rgba(101, 148, 245, 0.3);
    background: linear-gradient(180deg, rgba(39, 60, 102, 0.96), rgba(24, 34, 56, 0.96));
    color: #dfe9fb;
}

.ai3d-upload-single-action-btn svg,
.ai3d-upload-single-clear svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai3d-upload-single-action-btn:hover,
.ai3d-upload-single-action-btn:focus-visible {
    border-color: rgba(122, 190, 255, 0.42);
    background: rgba(23, 32, 50, 0.98);
    color: #f4f9ff;
    transform: translateY(-1px);
    outline: none;
}

.ai3d-upload-single-clear:hover,
.ai3d-upload-single-clear:focus-visible {
    border-color: rgba(255, 154, 173, 0.42);
    background: rgba(78, 26, 39, 0.98);
    color: #fff2f5;
    transform: translateY(-1px);
    outline: none;
}

.ai3d-upload.is-multi {
    text-align: left;
}

.ai3d-upload-preview {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    display: block;
}

.ai3d-upload-multi-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    color: #9ca8c2;
    font-size: 12px;
    line-height: 1.6;
}

.ai3d-upload-multi-head strong {
    color: #fff;
}

.ai3d-upload-primary {
    margin-bottom: 10px;
}

.ai3d-upload-primary-card {
    border: 1px solid rgba(84, 197, 255, 0.35);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(22, 34, 56, 0.92), rgba(12, 17, 28, 0.92));
    padding: 10px;
}

.ai3d-upload-primary-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #9fd8ff;
    font-size: 12px;
}

.ai3d-upload-primary-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background: rgba(255, 255, 255, 0.03);
}

.ai3d-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ai3d-upload-grid--fixed {
    margin-top: 4px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai3d-upload-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 236px;
    padding: 12px;
    border: 1px solid rgba(132, 156, 198, 0.16);
    border-radius: 16px;
    background:
        radial-gradient(circle at top right, rgba(79, 121, 214, 0.12), transparent 42%),
        linear-gradient(180deg, rgba(14, 20, 33, 0.98), rgba(9, 13, 22, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.ai3d-upload-slot::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 32%);
    pointer-events: none;
}

.ai3d-upload-slot--primary {
    border-color: rgba(92, 204, 255, 0.34);
    background:
        radial-gradient(circle at top right, rgba(71, 210, 255, 0.18), transparent 46%),
        linear-gradient(180deg, rgba(15, 27, 40, 0.98), rgba(8, 13, 24, 0.98));
}

.ai3d-upload-slot.is-filled {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 14px 34px rgba(0, 0, 0, 0.22);
}

.ai3d-upload-slot-head {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #9eacc7;
    font-size: 12px;
    line-height: 1.5;
}

.ai3d-upload-slot-empty-state,
.ai3d-upload-slot-body {
    position: relative;
    z-index: 1;
}

.ai3d-upload-slot-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 6px;
    padding: 16px;
    border: 1px dashed rgba(148, 169, 205, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.ai3d-upload-slot-empty-state strong {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin: 0;
    color: #edf4ff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.15;
}

.ai3d-upload-slot-empty-state strong span {
    display: block;
    white-space: nowrap;
}

.ai3d-upload-slot-required {
    position: absolute;
    top: -6px;
    right: 6px;
    display: inline-block;
    padding: 0 5px;
    border-radius: 999px;
    background: #d93a49;
    color: #fff3f3;
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: 0;
    vertical-align: middle;
    z-index: 2;
    pointer-events: none;
}

.ai3d-upload-slot-empty-state p {
    margin: 0;
    color: #7d8aa4;
    font-size: 12px;
    line-height: 1.6;
}

.ai3d-upload-slot:not(.is-filled) .ai3d-upload-slot-head,
.ai3d-upload-slot-empty-state p {
    display: none;
}

.ai3d-upload-slot:not(.is-filled) .ai3d-upload-slot-empty-state {
    align-items: center;
    justify-content: center;
    gap: 0;
    text-align: center;
}

.ai3d-upload-slot:not(.is-filled) .ai3d-upload-slot-empty-state strong {
    font-size: 16px;
    letter-spacing: 0.01em;
}

.ai3d-upload-slot-empty-state--action {
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ai3d-upload-slot-empty-state--action:hover,
.ai3d-upload-slot-empty-state--action:focus-visible {
    border-color: rgba(96, 185, 255, 0.32);
    background:
        radial-gradient(circle at top center, rgba(76, 190, 255, 0.12), transparent 56%),
        rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 0 0 1px rgba(101, 188, 255, 0.12);
    transform: translateY(-1px);
    outline: none;
}

.ai3d-upload-slot-empty-state--action:focus-visible {
    box-shadow:
        inset 0 0 0 1px rgba(101, 188, 255, 0.2),
        0 0 0 3px rgba(66, 139, 255, 0.18);
}

