/* 上传题目：向导、拖放、分句编辑（v2） */

.wizard {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: var(--sp-6);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    color: var(--muted-2);
    font-weight: var(--weight-medium);
    white-space: nowrap;
}

.wizard-step .ws-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: var(--weight-semibold);
    font-variant-numeric: tabular-nums;
    transition: border-color var(--dur-2), color var(--dur-2), background var(--dur-2);
}

.wizard-step.is-active { color: var(--ink); }
.wizard-step.is-active .ws-num {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
[data-theme="dark"] .wizard-step.is-active .ws-num { color: #06201c; }

.wizard-step.is-done { color: var(--brand-strong); }
[data-theme="dark"] .wizard-step.is-done { color: var(--brand); }
.wizard-step.is-done .ws-num {
    background: transparent;
    border-color: var(--brand-line);
    color: var(--brand-strong);
}

.wizard-line {
    flex: 1;
    height: 1px;
    background: var(--line);
    margin: 0 14px;
    min-width: 20px;
}

/* 上传页内部不再卡片套卡片 */
#upload-stage > .card,
#upload-stage .card {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

#upload-stage .card + .card {
    border-top: 1px solid var(--line);
    margin-top: 28px;
    padding-top: 24px;
}

#upload-stage .card-header {
    padding: 0 0 12px;
    border-bottom: 1px solid var(--line);
}

.dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 260px;
    padding: 32px;
    border-radius: 12px;
    border: 1.5px dashed var(--line-strong);
    background: var(--surface-2);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--dur-2), background var(--dur-2);
}

.dropzone:hover,
.dropzone.is-drag {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.dropzone.is-drag { transform: none; }

.dropzone .dz-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    box-shadow: none;
}

.dropzone .dz-icon svg { width: 24px; height: 24px; }

.dropzone .dz-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: var(--weight-semibold);
    letter-spacing: -0.02em;
    color: var(--ink-2);
}

.dropzone .dz-desc {
    font-size: 13px;
    color: var(--muted-2);
    line-height: 1.65;
    max-width: 360px;
}

.dropzone .dz-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface-3);
    animation: scale-in var(--dur-3) var(--ease-out);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb .thumb-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(10, 12, 14, 0.62);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: background var(--dur-2);
}

.thumb .thumb-remove:hover { background: var(--danger); }

.thumb .thumb-tag {
    position: absolute;
    left: 5px;
    bottom: 5px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(10, 12, 14, 0.62);
    color: #fff;
    font-size: 10px;
    backdrop-filter: blur(4px);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.form-grid .span-2 { grid-column: 1 / -1; }

.sentence-editor {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--line);
}

.sentence-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 14px;
    padding: 16px 0;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    transition: background var(--dur-2);
}

.sentence-row:focus-within {
    background: var(--surface-2);
}

.sentence-row .sr-num {
    padding-top: 10px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--muted-2);
    text-align: right;
}

.sentence-row .sr-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    padding-right: 34px;
}

.sentence-row .sr-fields .input,
.sentence-row .sr-fields .textarea {
    min-height: 42px;
    font-size: 14px;
    background: var(--surface);
}

.sentence-row .sr-fields .textarea { min-height: 96px; }

.sentence-row .sr-remove {
    position: absolute;
    right: 6px;
    top: 6px;
}

.ai-note {
    display: flex;
    gap: 10px;
    padding: 10px 0 10px 12px;
    border-radius: 0;
    border: 0;
    border-left: 2px solid var(--warn);
    background: transparent;
    color: var(--warn);
    font-size: 12.5px;
    line-height: 1.7;
}

.ai-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }

.action-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0 calc(14px + env(safe-area-inset-bottom));
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--line);
    background: var(--bg);
    box-shadow: none;
    margin-top: var(--sp-6);
    z-index: 10;
}

.action-bar .ab-info {
    font-size: 12px;
    color: var(--muted-2);
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.action-bar .ab-actions {
    display: flex;
    gap: 9px;
    margin-left: auto;
    flex: none;
}

@media (max-width: 640px) {
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .action-bar {
        bottom: calc(78px + env(safe-area-inset-bottom));
        padding: 10px 0;
    }
    .action-bar .ab-info { display: none; }
    .action-bar .ab-actions { width: 100%; }
    .action-bar .btn { flex: 1; }
    .wizard-step .ws-text { display: none; }
    .wizard-line { margin: 0 10px; }
    .sentence-row {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 10px;
    }
    .sentence-row .sr-fields {
        grid-template-columns: minmax(0, 1fr);
        padding-right: 30px;
    }
}
