.vm-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(17, 24, 39, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    font-family: 'Nunito', sans-serif;
}
.vm-modal.hidden, .vm-modal .hidden { display: none !important; }
.vm-card {
    background: #fdfbf7;
    border-radius: 14px;
    border-top: 6px solid #15803d;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 1000px;
    max-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.vm-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid #e5e7eb; }
.vm-head h3 { margin: 0; font-family: 'Itim', cursive; font-size: 1.5rem; color: #14532d; font-weight: 400; }
.vm-day { color: #6b7280; font-size: 1.1rem; }
.vm-close { background: none; border: none; font-size: 2rem; line-height: 1; color: #6b7280; cursor: pointer; }
.vm-close:hover { color: #b91c1c; }

.vm-body { display: flex; gap: 20px; padding: 16px 18px; overflow: hidden; flex: 1; min-height: 0; }
.vm-preview { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.vm-preview canvas {
    height: min(62vh, 580px);
    aspect-ratio: 9 / 16;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    background: #fdfbf7;
}
.vm-preview-bar { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: #6b7280; }
.vm-side { flex: 1; overflow-y: auto; min-width: 0; padding-right: 4px; }

.vm-start p { color: #374151; line-height: 1.6; margin: 0 0 14px; }
.vm-start .vm-btn { display: block; width: 100%; margin-bottom: 10px; padding: 12px; font-size: 1rem; }
.vm-error { color: #b91c1c !important; font-weight: 600; }

.vm-form h4 { margin: 14px 0 6px; font-family: 'Itim', cursive; font-weight: 400; font-size: 1.2rem; color: #14532d; }
.vm-form h4:first-child { margin-top: 0; }
.vm-row { display: flex; gap: 8px; align-items: flex-end; }
.vm-row .vm-field:nth-child(2) { flex: 1; }
.vm-field { display: block; margin-bottom: 8px; }
.vm-field > span { display: block; font-size: 0.8rem; font-weight: 700; color: #4b5563; margin-bottom: 2px; }
.vm-form input, .vm-form textarea {
    width: 100%;
    padding: 7px 9px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    resize: vertical;
}
.vm-form input:focus, .vm-form textarea:focus { outline: 2px solid #86efac; border-color: #15803d; }
.vm-form input.vm-emoji { width: 64px; text-align: center; font-size: 1.2rem; padding: 4px; }
.vm-scene { border: 1px dashed #d1d5db; border-radius: 8px; padding: 8px 10px 4px; margin-bottom: 8px; background: #fff; }
.vm-scene textarea { margin-bottom: 6px; }
.vm-remove { border: none; background: none; color: #9ca3af; font-size: 1.1rem; cursor: pointer; padding: 0 4px 12px; }
.vm-remove:hover { color: #b91c1c; }
.vm-check { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 700; color: #14532d; margin-bottom: 6px; cursor: pointer; }
.vm-check input { width: 16px; height: 16px; accent-color: #15803d; }
.vm-tools { display: flex; align-items: flex-end; }
.vm-remove:disabled { opacity: 0.3; cursor: default; }
.vm-remove:disabled:hover { color: #9ca3af; }
.vm-insert {
    display: block;
    width: 100%;
    margin: 0 0 8px;
    padding: 2px 0;
    border: none;
    border-top: 1px dashed transparent;
    background: none;
    color: #9ca3af;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    opacity: 0.75;
}
.vm-insert:hover, .vm-insert:focus-visible { opacity: 1; color: #15803d; border-top-color: #86efac; }
.vm-hint { margin: 0 0 8px; font-size: 0.8rem; color: #6b7280; line-height: 1.5; }
.vm-image-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.vm-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid #d1d5db; cursor: pointer; }
.vm-image-missing { font-size: 0.8rem; color: #b45309; font-weight: 700; }

.vm-btn {
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    color: #1f2937;
}
.vm-btn:hover { border-color: #15803d; }
.vm-btn:disabled { opacity: 0.6; cursor: default; }
.vm-primary { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.vm-primary:hover { background: #991b1b; }
.vm-add { width: 100%; border-style: dashed; color: #15803d; }
.vm-btn.vm-small { padding: 5px 10px; font-size: 0.8rem; }
.vm-btn.vm-add-image { border-style: dashed; color: #1d4ed8; }
.vm-btn.vm-danger { color: #b91c1c; }
.vm-report { display: block; margin: 14px 0 4px; padding: 0; background: none; border: none; font: inherit; font-size: 0.82rem; font-weight: 700; color: #b45309; text-decoration: underline; cursor: pointer; }
.vm-report:hover { color: #92400e; }

.vm-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid #e5e7eb; }
.vm-foot label { font-size: 0.85rem; font-weight: 700; color: #4b5563; margin-right: auto; }
.vm-foot select { margin-left: 6px; padding: 5px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-family: inherit; }
.vm-progress { flex-basis: 100%; height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; order: -1; }
.vm-progress div { height: 100%; width: 0; background: #15803d; transition: width 0.2s; }

@media (max-width: 720px) {
    .vm-head { padding: 10px 14px; }
    .vm-head h3 { font-size: 1.25rem; }
    .vm-day { font-size: 0.95rem; }
    .vm-body { flex-direction: column; overflow-y: auto; }
    .vm-preview canvas { height: 46vh; }
    .vm-side { overflow: visible; }
}
